GUISkin problem

Hi friends.

I want to use GUISkin to customize the button, but it doesn’t seem to work. I have created the GUI Skin in Project panel and assigned it by doing drag and drop, changed some options in the Inspector. I guess there is something wrong with my code?

var lost : boolean = false;
var mygui: GUISkin;
function Update () {
if (transform.position.y < -15){
if (!lost)
{
lost = true;
}
}
}
function OnGUI()
{
GUI.skin = mygui;
if(lost)
{   
var halfScreenW:float = Screen.width/2; 
var halfButtonW:float = Screen.width/8; 
var halfScreenH:float = Screen.height/2; 
var halfButtonH:float = Screen.height/4; 

     if (GUI.Button(Rect(halfScreenW - halfButtonW, halfScreenH - halfButtonH, halfButtonW, halfButtonH), "Play again"))
	 {
	 Application.LoadLevel(0);
	 }
}
}

Here

var lost : boolean = false;

var mygui: GUISkin;

function Update () {

if (transform.position.y < -15){

if (!lost){

lost = true;

}

}

}

function OnGUI(){

GUI.skin = mygui;

if(lost == true){   

var halfScreenW:float = Screen.width/2; 

var halfButtonW:float = Screen.width/8; 

var halfScreenH:float = Screen.height/2; 

var halfButtonH:float = Screen.height/4; 



     if (GUI.Button(Rect(halfScreenW - halfButtonW, halfScreenH - halfButtonH, halfButtonW, halfButtonH), "Play again", "Button")){

	 Application.LoadLevel(0);

	 }

}

}

See at the end of the GUI Button how it says “button” you put the name of whats on the Gskin to display it.

If you need more help send me a Message.

Bikebreck