OnMouseDown on Sprites (c#)


I’m not getting any response from an OnMouseDown method in a script attached to a 2D sprite.

I’ve attached a box collider to the sprite, but it still doesn’t register any clicks. I’ve also tried printing to debug.Log with OnMouseOver, but nothing is being registered.


Try to replace box collider with box
collider 2d or vise vera.

Seems to have fixed it, thanks