So the last two days i have tried to wrap my head around GUI but i cant seem to get the thing out of it that i want.
The basic idea is that i want a GUI screen to pop up when i touch a certain game object (The orb, if anyone saw my last post) and say “You won” and then show a score and two buttons saying “Play again” and “Continue”.
Try this?
void OnGUI()
{
if(bool)
{
GUI.Label(Rect(Screen.height-10,Screen.width-40,20,80),“You WIN!”);
if(GUI.Button(Rect(Screen.height+40,Screen.width-80,20,20,“Play Again?”);
Application.LoadLevel(yourLevel); or do what ever you want
if(GUI.Button(Rect(Screen.height+40,Screen.width+60,20,20,“Continue”);
again whatever
}
}
Just adjust the values and have fun btw this should be called when the sphere is touched like through boolean variables
This is a C# script right? Cause i really can’t seem to get it working :S
Here is what i have come up with so far (not that much since i got a lot of errors):