I made a start menu with a button to load the game, but for some reason it made one textured button in the center and one untextured button in the top left corner.
var BoxStyle : GUIStyle;
var ButtonStyle : GUIStyle;
function OnGUI ()
{
GUI.Box(Rect(0, 0, Screen.width, Screen.height), "Survival", BoxStyle);
GUI.Button(Rect(165, 70, 80, 40), "Start", ButtonStyle);
if (GUILayout.Button ("Start"))
{
Application.LoadLevel ("Island");
}
}
I think I may know the problem, but I don't know how to fix it. Did I create on button with this code: GUI.Button(Rect(165, 70, 80, 40), "Start", ButtonStyle); and another with this code: if (GUILayout.Button ("Start"))?
If so how can I fix it?