unity change text

C#
// To change text of a text UI element use th combination below
textGameObject.GetComponent<UnityEngine.UI.Text>().text = "text";
Source

Also in C#: