Hey Guys!
I would like to ask about making a Main Menu with the usuall Story,Multi,Options tag.
I would not like this to be in the scene, but if like I click on Single, Maps come up, and if i click on a map that Scene loads in.
How can i make such a thing?
THanks, Draul
You could do something like this:
var MainMenu=true;
var Singleplayermenu=false;
function OnGUI()
{
if(MainMenu)
{
if(GUI.Button(Rect(50,50,50,50),"SinglePlayer")
{
SinglePlayerMenu=true;
MainMenu=false;
}
if(GUI.Button(Rect(50,100,50,50),"MultiPlayer")
{
MultiPlayerMenu=true;
MainMenu=false;
}
}
if(SinglePlayerMenu)
{
if(GUI.Button(Rect(100,100,50,50),"Map1")
{
SinglePlayerMenu=false;
Application.LoadLevel("1");
}
if(GUI.Button(Rect(200,100,50,50),"Map2")
{
SinglePlayerMenu=false;
Application.LoadLevel("2");
}
}
//Similar with Multiplayer,Options,.....
}
I hope this helps.
Create a scene containing your GUI. When you click the button, load the scene.
See also: