- Home /
The question is answered, right answer was accepted
[Solved]Label is not a member of GUI anymore.
So, unity says that i can no longer use labels anymore since it's no longer a part of the GUI system. I've read several other posts abotu this that are same as mine, unless im blind which i don't think i am. Not sure though. What am i doing wrong? :( !!!Also, the code is in my OnGUI function!!! Code :
GUI.Label (Rect (10, 10, 100, 20), "Hello World!");
Error :
'Label' is not a member of 'GUI'.
Answer by meat5000 · Mar 15, 2015 at 11:09 PM
Apparently, dont call your script GUI.js
Wow.... Really. I don't get the logic. How? Thanks anyways though. It's working now :)
You call your class GUI so it hide the UnityEngine.GUI class in which Label is defined. If you called it $$anonymous$$yGUI then it is not the same name, it won't hide anything.
Follow this Question
Related Questions
GUI opacity. 1 Answer
How Would I Make A GUI Label Fade After A Certain Amount Of Time? 1 Answer
Setting Scroll View Width GUILayout 1 Answer
For Loop GUILayout.Label Problems 1 Answer
GUI Crosshair 2 Answers