//needed in order to use Text Mesh Pro
using TMPro;
public class YourClass : MonoBehaviour
{
public TextMeshProUGUI InfoText;
public void Something() {
//Write to the text mesh pro element InfoText
InfoText.text = "Write whatever text you want here!";
}
}