GUI Button in the middle of screen?

is it possible?
here’s my code…

—CODE—

var centeredStyle2 = GUI.skin.GetStyle("Button");
if(GUI.Button (Rect (Screen.width/2-50, Screen.height/2+10, 100, 50), "Halloa", centeredStyle2)

{
  Application.LoadLevel(0);
}

Yes it is indeed possible, other than the fact that the button needs to be rendered in OnGUI and you need an extra bracket in the GUI.Button line. So like this:

var centeredStyle2 = GUI.skin.GetStyle("Button");

function OnGUI () {
	if(GUI.Button (Rect (Screen.width/2 - 50, Screen.height/2 + 10, 100, 50), "Halloa", centeredStyle2)) {
  		Application.LoadLevel(0);
	}
}

Other than that, you’re all good. :wink:

Hope that helps, Klep