Hi I have created a simple menu in Unity but I wanted to create my own style for colour/fonts.
However for some reason it prints each button twice to the screen, once with my custom style, and once without.
this is the code I have used:
if(menu){
if (GUI.Button(Rect(Screen.width/2 - 50, Screen.height/2, 100, 30), "Start Game", customGuiStyle)){
Application.LoadLevel ("Level 1");
}
if (GUI.Button(Rect(Screen.width/2 - 50, Screen.height/2 + 30, 100, 30), "Options", customGuiStyle)){
menu = false;
options = true;
}
if (GUI.Button(Rect(Screen.width/2 - 50, Screen.height/2 + 90, 100, 30), "Quit", customGuiStyle)){
Application.Quit();
}
}
I have no idea why it is showing two texts, heres a screen shot of exactly what I mean...