2D GUI Boxes/Labels not visible

Hi all,

For the moment I’m sticking with Unity 4.3, and so I’m still using GUI labels, boxes, et al rather than the Canvas system. My problem is this - I’ve got a GameObject in my Inspector, called GUI, with a child called AmmoCounter. This Label is meant to render a little box in the corner that shows how much ammunition remains for a player’s weapon. For the time being, I’m focussing on just getting the GUI to render in the first place. As such, I attached the following script to AmmoCounter:

using UnityEngine;
using System.Collections;

public class ammoCounterGUI : MonoBehaviour {

	void onGUI(){
		GUI.Box (new Rect (0, Screen.height-50, 100, 50), "Test");	}

(I also tried a version with GUI.Label, which was just as ineffective).

But when I loaded my game, no box of any kind was visible. Now, I suspect that there might be something along the lines of the GUI element being present, but not visible here, such as if it were being rendered behind the background or off the side of the screen. And yet, I’m fairly convinced that, given the coordinates used, the box should be visible. Is there something I’m missing here?

You should correct your spelling: Use OnGUI not onGUI.