- Home /
 
Hide GUI label on press
Hi, I am using the GUI.Button() function to display a button on the screen and i wanted to know how i could make the button disappear once it was clicked on it.I know the bsic logic is to have an if condition and then enter the code, i wanted to know what that code would be.Thanks
               Comment
              
 
               
               
               Best Answer 
              
 
              Answer by femi · Jan 19, 2011 at 07:46 AM
in C#:
bool buttVisible = true;
 
               void OnGui() { if (buttVisible) { if (GUI.Button( "....." )) { buttVisible = false; .... } } } 
 
              Your answer