I'm trying to make a toolbar system in my game but I can’t find a ways to detect a mouse click on a UI element only or to detect if it's over it, the regular detect system isn’t working.
I tried:
void OnMouseDown()
{
Debug.Log(“yay”);
}
But the message is never logged.