is there a way to detect OnMouseDown on a UI image?

I’ve been having truble figuring this out, i thogth it was matter of adding a collider to the object that has the image and the script with the OnMouseDown method but it doesn’t work, does it has something to do with the canvas?, because when i do it in a normal gameObject with a sprite works perfectly, but with the object inside the canvas that has an image doesn’t work, what am i douing wrong?, many thanks!

Well there is a way but i would recommend you to attach Button to the UI Image, If you need more explanation tell me :).

I understand, but then it’s not the way to do what i want, which is to have an “interactive” Hud over the 3d enviroment, i already went the right way by using two cameras, thanks for the suggestion!