Hi, i want to make a game. If you move to a box a messagebox/ Gui will come up that says “Do you want to go to the next level?” and if you press the button yes then you will go to the next level. if you move away from that box the GUI will disiper. Some good advice or code ? :shock:
Well, that particular box can have a trigger or collider associated with it, which then changes a state and then activates something in the OnGUI() method which basically says:
OnGUI() {
if(readyToLevel == true){
if(GUI.Button(*positionRectangle*), "Next Level?"){Application.LoadLevel(NextLevel);}
}
The outer if-statement should be toggled by your trigger, then the GUI would show and if the person presses the button, they would go to the next level.
That can be tightened down for performance a bit, but that should get you started.
Okee, do you know some good videos where i can learn some good programming for unity ?
here’s a vid that shows you how to change lvls easy
I have tryd that, but the gui is always enable
ohh, i’ve atleast havn’t any probs with that
Can you send me you project as a zip formate where you are having that function?
@ eoop.org@gmail.com