unity get Text ui code example
Example 1: get text component unity
GameObject.GetComponent<Text>().text = "Hello World!";
Example 2: unity gui text
public Text myText;
void Start()
{
myText.text = "This is my text";
}
GameObject.GetComponent<Text>().text = "Hello World!";
public Text myText;
void Start()
{
myText.text = "This is my text";
}