Hi!
I made this simple GUI script based on some tutorials, and after applying it to empty game object and pushing play, GUI won’t show up. Any ideas?
private var buttonWidth:int = 200;
private var buttonHeight:int = 50;
var spacing:int = 25;
function OnGUI()
{
GUILayout.BeginArea(Rect(Screen.width/2 - buttonWidth/2, Screen.height/2 - 200, buttonWidth, - 400));
if(GUILayout.Button("New Game", GUILayout.Height(buttonHeight)))
{
Application.LoadLevel("Game");
}
GUILayout.Space(spacing);
if(GUILayout.Button("Continue", GUILayout.Height(buttonHeight)))
{
Application.LoadLevel("testcontinue");
}
GUILayout.Space(spacing);
if(GUILayout.Button("Exit", GUILayout.Height(buttonHeight)))
{
Application.Quit();
}
GUILayout.EndArea();
}