Question by
Thephil2988 · Jan 29, 2018 at 07:36 PM ·
gameobjecttextscrollviewparentingthis
UI text not showing in my scrollView
I have a scrollview, that i am trying to display a piece of text inside. When the following code i get an object with a text component. It has the content as parent, but it doesnt appear when i run the program. Any help would be appriciated
code:
newGO = new GameObject("myTextGO");
newGO.transform.SetParent(this.transform);
Text myText = newGO.AddComponent<Text>();
myText.text = "Ta-dah!";
Comment