Hi everyone!
I am making game and I want to create a menu with some GUIText tagged as “Texto”. They have to change to yellow if the mouse is over the text and stay in white if the mouse is not.
So, I tried to use the next part of code in my script written in C# but nothing happens.
void OnMouseEnter(GUIText otros)
{
if (otros.CompareTag("Texto"))
{
otros.color = Color.yellow;
}
}
void OnMouseExit(GUIText otros)
{
if (otros.CompareTag("Texto"))
{
otros.color = Color.white;
}
}
Thanks for help and sorry for my english.