x


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.....

http://pastebin.com/tKpT4fkG

more ▼

asked Jun 17 '11 at 05:43 AM

darkcookie gravatar image

darkcookie
294 16 25 32

(comments are locked)
10|3000 characters needed characters left

2 answers: sort voted first

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);
        }
}
more ▼

answered Jun 17 '11 at 05:59 AM

flaviusxvii gravatar image

flaviusxvii
3k 13 19 43

(comments are locked)
10|3000 characters needed characters left

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 >>>>>>}<<<<<:)

more ▼

answered Jun 17 '11 at 06:09 AM

darkcookie gravatar image

darkcookie
294 16 25 32

And you use an answer as a comment again.. you, sir, are a madman!

Jun 17 '11 at 07:40 PM flaviusxvii
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x3816
x3420
x820
x111

asked: Jun 17 '11 at 05:43 AM

Seen: 890 times

Last Updated: Jun 17 '11 at 07:40 PM