unity get text from text code example Example: get text component unity GameObject.GetComponent<Text>().text = "Hello World!";