GUI Button Not Apearing

function OnGUI () {

if (GUI.Button (Rect (10, 10, 100, 50), "Quit")) {
		Application.Quit();
	}
}

Nothing shows up on screen. I’ve tried various different positions. Any ideas?

You attached the script to an gameobject, right?

Ehem…

Try this.

Var btn = gui.button();
If(btn)
Btn = gui.button();

The original code works fine.

Perhaps you’re running at a high resolution and don’t notice the button.

Is this a “No, I haven’t attached it to a GameObject yet”? :stuck_out_tongue:

It should be at the top left of his screen…eh??