Mouseover script (C#)

hey guys!
what I want is a thing that unity returns true if I have my mouse over a gameobject, maybe with a tag.
im not the best at scripting so I don’t even have an idea of what to do here.

hope some awesome people can help me! XD

Hello phil2988! You should use the OnMouseEnter fuction. Here is the example code:

C#

void OnMouseEnter()
{
    //Do something
}

JS

function OnMouseEnter()
{
    //Do something
}

When you are attaching these scrpts, you need to attach them on a game object.

Ivan Bozovic