Hye !
I am looking for code that would allow me to expand a game object when I rolls the mouse.
i found this :
var scaleFactor : float = 1.5f;
function OnMouseEnter ()
{
transform.scale *= scaleFactor;
}
function OnMouseExit ()
{
transform.scale /= scaleFactor;
}
But it doesn’t work, when i put the script on my game object i have this error :
NullReferenceExeption: Object reference not set to an instance of an object
Somebody have an idea ?
PS : really sorry for my bad english.