how to reference text mesh pro element in inspector code example
Example 1: what is the namespace for textmesh pro
using TMPro; //This namespace allows you to use TMP related actions
public GameObject GameObject //Second word is variable type
//Make sure you make a ref. in inspector //You can name the 3rd word whatever
GameObject.GetComponent<TextMeshPro>().text = "Whatever";
//above is the special TMPro name space
Example 2: unity get textmesh pro component
GetComponent<TMPro.TextMeshProUGUI>().text