- Home /
Changing a text equal to a string variable
I have a string variable and I have text. I would like to make my text equal to my string variable through scripts. Can somebody please help me?
Comment
Answer by KdRWaylander · Feb 19, 2018 at 05:24 PM
Hi,
https://docs.unity3d.com/ScriptReference/UI.Text-text.html
Instead of
m_MyText.text = "This is my text";
Use:
m_MyText.text = **your variable**;
And if it's not clear enough: https://www.youtube.com/watch?v=m3S-X-ZESu0
Cheers
Your answer
Follow this Question
Related Questions
Unity UI: Text Adventure 2 Answers
Multiple Cars not working 1 Answer
Populating Dictionary at run-time from .txt file on imported asset bundle 0 Answers
I can't print a int.ToString() variable in a guiText.text 1 Answer
Display additional text before the variable that the user is editing in a GUI Text Field 1 Answer