how to get text of text object in unity code example Example: get text component unity GameObject.GetComponent<Text>().text = "Hello World!";