How do I detect a mouse hover?

I am trying to make a script that would do something when I hover over a 3D Text object. This is what I think is correct…

#Pragma Strict

function OnMouseOver()
{
   //Do something
}

function LeaveMouseOver()
{
   /Do something else
}

There is no OnMouseLeave(). It is OnMouseExit(). And what you will will depend on what you are doing during the hover. Typically you would either use an OnMouseEnter() and OnMouseExit() as a pair, or OnMouseOver(). Note that 3D Text does not come with a collider. Typically folks who want to do some sort of collision or raycasting against a 3D Text object (which is what is happening under the hood when you use the OnMouse* callbacks) put a BoxCollider on the 3D Text.