- Home /
GUIText is invisible after instantiate
Hello,
Am trying to instantiate a GUItext when it's needed (making a game similar to doodle jump and i want to indicate the height after a certain distance). This should be a very simply task to do but for some reason when instantiate the GUIText, i just don't see it, it's there, no error and the text field contain the correct string but it is not there, anyone faced and solved this problem before ?
Thank you.
Answer by Arcadewiz · Aug 02, 2014 at 10:21 AM
Why do you require to instantiate it. Just disable/enable it. Check this and see if it helps
http://answers.unity3d.com/questions/48753/how-to-enabledisable-guitext-through-javascript.html
because the number of GUItext i need is unknown, i don't know how far the player will go, and i need to instantiate a number (10m, 20m...100m,etc...) with every platform, and these (platforms) are instantiated everytime the player travel 10meters (10 unity unit). Also, why GUItext become invisible in the first place ? this is really strange. thanks.
Try running your scene and checking the inspector of the instantiated GUIText at runtime to see if you can find what components are not working or why it is not showing. Then you could share it here as to exactly what the inspector shows...
Oh!! it's the y position that is messed up !! i will try to figure it out now and see what i can do (GUI is the only thing i hate in unity -_- )