Answers for "unity change text"


unity change text

// To change text of a text UI element use th combination below
textGameObject.GetComponent<UnityEngine.UI.Text>().text = "text";
Posted by: Guest on February-20-2020

unity set text value

//Because the Text variable is public, 
//you will have to drag the Text box object onto the script in unity.
//So unity knows what text box to apply the script to.

public Text myText;
myText.text = "Enter the text value here!";

By: Barry Cox
Posted by: Guest on March-18-2020

unity how to change text in script

Text myText = GameObject.Find("Canvas/Text").GetComponent<Text>();
myText.text = "Your text changed!";
Posted by: Guest on February-13-2020

C# Answers by Framework

Browse Popular Code Answers by Language