The scripting guide states that OnMouseOver is called “every frame while the mouse is over the GUIElement”.
Isn’t GUI.Box a GUIElement? If so, then why wouldn’t the following work?
Thanks!
function OnGUI ()
{
GUI.Box(Rect(10,10,300,300),"I'm a box");
}
function OnMouseOver ()
{
Debug.Log("I'm over the box.");
}