Hi, so I'm trying to make a Menu in my game. The scence is all set up. So, now I need to know how to make the menu. I'm not much familiar with GUI. So I need to know the easiest and effective way to do this. I need to include these buttons. 1. Start Game > New Game, Continue Game, Load Game. 2. Options > Controls, Graphics, Sounds. 3. Exit Game I need to know how to do this and I'd realy appriciate if you could show me a script example. Thanks!
To make a main menu.... hmmmm... you'll have to get familiar with GUI.... here's a script i made for my main menu... am still learning alot on unity though. Am not working on my main menu yet so this isnt really perfect... but alter a few values in the script to see/try and get a little understanding var exitTexture : Texture2D; var level1 = 0; var level2 = 0; var level3 = 0; var level4 = 0; var level5 = 0; var level6 = 0; function OnGUI (){ if(GUI.Button(Rect(30,20,30,30), exitTexture)) { Application.Quit(); } GUI.color = Color.red; GUI.Box(Rect(1000,40,300,530), ""); GUI.contentColor = Color.black; GUI.color = Color.blue; GUI.skin.font = font; if(GUI.Button(Rect(1025,200,250,50), "Level 1")) { Application.LoadLevel(level1); } if(GUI.Button(Rect(1025,260,250,50), "Level 2")) { Application.LoadLevel(level2); } if(GUI.Button(Rect(1025,320,250,50), "Level 3")) { Application.LoadLevel(level3); } if(GUI.Button(Rect(1025,380,250,50), "Level 4")) { Application.LoadLevel(level4); } if(GUI.Button(Rect(1025,440,250,50), "Level 5")) { Application.LoadLevel(level5); } if(GUI.Button(Rect(1025,500,250,50), "Level 6")) { Application.LoadLevel(level6); } }
Well, so to make a main menu i should use Unity GUI API or using Unity 4.6 UI new system? which one will be better for hotting mobile designs?