Here is the code snippet I have been working on:
function OnMouseEnter()
{
GetComponent(Renderer).material.color = Color.grey;
}
function OnMouseExit()
{
GetComponent(Renderer).material.color = Color.white;
}
I've noticed that when I apply this code to a standard game object, such as a cube, it functions as expected - changing color to grey when hovered over and back to white when not. However, when I attempt to use this with 3D text, nothing seems to happen regardless of what I try. Can someone point out where I might be going wrong and how I can resolve this issue?