GUI Scripting Hierarchy
Hello all,
This is my script:
if (GUI.Button(new Rect(310, 200, 60, 30), "Save"))
{
LogManager.AddLine("Player's name is: " + yourName); //save players name
GUI.Label(new Rect(187, 145, 310, 20), "your name was saved, you can now press Log In"); //CANT SEE THIS WHY??
}
When I play the scene, the GUI menu shows. When I press the button "Save" it will run the method, but not the GUI.Label.
My guess it has to be because of the scripts' hierarchy, because outside the if statement this label "your name was saved..." is showing.
How can I fix this?
I've always found that API to be frustrating. It seems like you have to use it for certain editor plug-in functionality but I can't find a good case for using it in an actual game. Is it possible you can just move over to using the UGUI objects to solve this problem?
Your answer
Follow this Question
Related Questions
re historic GUI system 1 Answer
I am trying to close the GUI if its already active and the user clicks 0 Answers
How to change GUI label size 1 Answer
Multiplayer Hiding Layer just for Local Player 0 Answers
Getter and Setter Question! 1 Answer