- Home /
Question by
SecretImbecile · Mar 09, 2014 at 03:37 PM ·
c#collider 2dsprite clipping
OnMouseDown on Sprites (c#)
Hi,
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.
Thanks, SI
Comment
What else is going on in the scene? Are there multiple cameras? Is this GameObject a child of another?
There is a single camera but the buttons are a child of an empty object, so I can script them to move.
Try to replace box collider with box collider 2d or vise vera.
Best Answer
Answer by SecretImbecile · Mar 09, 2014 at 04:37 PM
Try to replace box collider with box collider 2d or vise vera.
Seems to have fixed it, thanks
Your answer