- Home /
how can i make my GUI disapear after i pressed a button?
how can i make my GUI disapear after i pressed a button that i named 6.25 m2 .....i just want to make all the GUI's disappear when I click this button (because its the correct answer)the script destroys an enemy ...in my case a cube..... the script is.....
Answer by flaviusxvii · Jun 17, 2011 at 05:59 AM
Are you even trying to figure this stuff out?
function OnGUI() {
if(showGUI) {
GUI.skin = guiSkin;
win1Rect = GUI.Window(1, win1Rect, fillWindow, win1);
GUI.Box(Rect(0, Screen.height-22, 100, 22), item2);
}
}
Answer by darkcookie · Jun 17, 2011 at 06:09 AM
ohhh thank you .....i am... so far i tried my best reading all the unity manuals and i made this script but i just couldn figure out where to put the if(showGUI) ...originaly i put it next to the Destroy(enemy) but that only got rid of the actual button......welll thank you .....i gess the lesson 4 me here is watch my >>>>>>}<<<<<:)
And you use an answer as a comment again.. you, sir, are a madman!