Answers for "get text component unity"

C#
2

get text component unity

GameObject.GetComponent<Text>().text = "Hello World!";
Posted by: Guest on December-23-2020
0

how to access a text gameobjceet in unity and change it

Text text = gameObj.GetComponentInChildren(typeof(Text)) as Text;
text.text = "text stuff";
text.font = prefferedFont;
Posted by: Guest on November-15-2020

C# Answers by Framework

Browse Popular Code Answers by Language