How to assign a value to a Text Variable during runtime?
You assign game objects to a gameobject variable like this right? using c# as script.
public GameObject diaobj;
public GameObject manobj;
void Awake()
{
diaobj = GameObject.Find("sayDialogue");
manobj = GameObject.Find("DialogueManager");
}
How do I assign a text variable?
public Text txtName;
public Text txtDialogue;
is it like this? void Awake() { txtName = (what)? please fill me in }
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612140612im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Is there any way to trigger a popUp UI when a player steps in a specific set of tiles? 0 Answers
Problems with player jumping (Welcome to Unity Answers The best place to ask and answer questions ) 0 Answers
how create EndLess game Like zombie Tsunami 1 Answer
problim with dontdestroyonload and counts death as 2 0 Answers