How can i display no box in my buttons?

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"); 

}



}

What you need to do is:

1: drop your script onto an object in the scene, i used the main camera.

2: make a guiskin(Assets->create->guiskin).

3: select your guiskin and expand the “button” tab.

4: set all the button states backgorunds(normal,hover,active,focused) to none.

5: select the object that has your script on it and drag your guiskin to the guiskin variable of your script.

now it should work without showing a border around the buttons.