Unity GUI not showing in webplayer????

I am trying to get a test up of my game and when i publish it to a web player, All the GUI Components dissapear

var mySkin: GUISkin; 
var fail;
var win;

function Start(){
fail = false;
win = false;
Time.timeScale = 1;
}


function OnCollisionEnter(collision : Collision) { 
   if (collision.gameObject.tag == "green") { 
   fail = true;
   }
   
    if (collision.gameObject.tag == "red") { 
   win = true;
   }
}

function OnGUI(){

	if (fail){
	GUI.skin = mySkin; 
	GUI.Label (Rect (650, 300, 100, 30), "You Failed");
      
	}
	
	if(win){
	GUI.skin = mySkin;
	
		if (GUI.Button (Rect (650,300,80,20), "Continue")) {
		Application.LoadLevel("Level 1");
		
		}
	}
	
}

If you comment out the “ifs” do the GUI elements show up? You need to pinpoint whether the problem is the GUI or the collisions not registering and hence the gui conditions not being met.

Well it works perfectly in Stand Alone… Just not webplayer

We’ve established that, but you’ve made the assumption that it’s the GUI that’s broken in the webplayer. And I’m saying that that is a perfectly valid conclusion, but it’s not the only one. If you comment out the if’s, you will then be certain that the GUI is broken in the webplayer. As it is, the collisions could be broken in the webplayer.

well the collisions aren’t broken either because i watch the cubes fall onto the platform below, then no GUI appears.

Well you obviously don’t need my help, so I’ll leave you to it.

Someone needs a hug… I never said you were wrong, i just said that wasn’t the problem. You need to step back and take a breather if you cant stand someone saying your suggestion didn’t work.

He wasn’t suggesting a solution, he was trying to remove unnecessary terms to narrow down the problem. It’s how you debug things.

So, if you take the if’s out, does the HUD show up all the time in the standalone and not show up at all in the web build? Seems like a simple question.

before the first ‘if’ add :
GUILayout.Label(“this gui works”);
and build to webplayer.
it could be your if-statement thats not working right.

@TheCowMan hey man, did you get to fix this? I’m having the same issue…

Ok, I fixed it, there was an error that wasn’t showing in the editor for some reason, only on the standalone debug, then the gui wasn’t being drawed