Does anyone know a good, up to date, GUI main menu tutorial anywhere? I have spent over 3 hours trying to figure it out and i just can not get ANYTHING TO WORK!!!
Three hours is literally equivalent to zero hours. Not even kidding.
Start with GUILayout to get a feel for what the various elements are (button, toggle, etc).
Here’s a thing to get you started:
function OnGUI() {
var buttonSize : GUILayoutOption[] = [GUILayout.Width(120)];
if ( GUILayout.Button("Start Game", buttonSize ) ) {
BeginGame();
}
if ( GUILayout.Button("Load Game", buttonSize ) ) {
LoadMenu();
}
if ( GUILayout.Button("Options", buttonSize) ) {
OptionMenu();
}
if ( GUILayout.Button("Exit", buttonSize ) ) {
Exit();
}
}
I would suggest using the unity reference website on GUI = Unity - Scripting API: GUI
for example with this button script i have added a simple level load part
if (GUI.Button(Rect(10,70,50,30),"Click"))
{
Application.LoadLevel("Scene Name");
}
I recommend getting a gui tool like nGUI and making your life a LOT easier
Here is a good one, Cgcookie, I find their tut pretty well made.
Find the one you want, if you can’t find a GUI (I think they talk about GUI in almost ever video, not sure) Good luck, if you don’t find GUI they still got good tuts and videos on how to make a game.