Hi all…
Really frustrating because i got it working a while ago but lost the project file. I want to make a button with only a transparant image in the middle and no box showing. So i’ve made a guiskin and turned all the items to “None”.
I use this script to generate the buttons:
var icon1 : Texture2D;
var icon2 : Texture2D;
var icon3 : Texture2D;
var icon4 : Texture2D;
var icon5 : Texture2D;
var guiskin : GUISkin;
function OnGUI () {
GUI.skin = guiskin;
GUI.Box == false;
if(GUI.Button (Rect (Screen.width/2 - 200, Screen.height/3.4 - 0,400,100), new GUIContent ("", icon1))) {
Application.LoadLevel ("level select");
}
if(GUI.Button (Rect(Screen.width/2 - 200, Screen.height/2.3 - 0,400,100), new GUIContent ("", icon2))) {
Application.LoadLevel ("options");
}
if(GUI.Button (Rect (Screen.width/2 - 200, Screen.height/1.75 - 0,400,100), new GUIContent ("", icon3))) {
Application.LoadLevel ("credits");
}
if(GUI.Button (Rect (Screen.width/2 - 200, Screen.height/1.4 - 0,400,100), new GUIContent ("", icon4))) {
//Application.LoadLevel ("scene1");
Application.Quit();
}
if(GUI.Button (Rect (Screen.width/2 - 200, Screen.height/1.15 - 0,400,100), new GUIContent ("", icon5))) {
Application.LoadLevel ("uitleg");
}
}