Unity-textmeshpro-script -
To script for TextMeshPro (TMP) in Unity, you must include the TMPro namespace at the top of your script. A useful tip for flexible coding is to use the base class TMP_Text , which allows your script to work with both and 3D World Space text objects. Core Scripting Essentials
TextMeshPro : For text that exists in (Mesh Renderer). unity-textmeshpro-script
TMP_Text : Use this to reference either type in your code for better reusability . Example: Simple Score Script To script for TextMeshPro (TMP) in Unity, you