// To change text of a text UI element use th combination below textGameObject.GetComponent<UnityEngine.UI.Text>().text = "text";
Text myText = GameObject.Find("Canvas/Text").GetComponent<Text>(); myText.text = "Your text changed!";
using UnityEngine.UI; using TMPro; void Update() { TextMeshPro lemonsss = GetComponent<TextMeshPro>(); }