- Home /
Question by
Raven19528 · Jul 06, 2020 at 07:23 AM ·
canvasbuttonsevent triggeringbuttonstates
Where could errant "OnMouseEnter" and "OnMouseExit" events be coming from?
Working in Unity 2019.2.19f1, I have a project that was sent to me by a colleague. There are 2D buttons right next to each other that are detecting mouse enter and exit events far into other button canvases. 2D polygon colliders are set on the buttons to constrain them, but behavior continues. This is a 2D section of the game that is built in a 3D environment.
Comment
Answer by tBurger · Jul 06, 2020 at 10:03 AM
If you're using Unity UI, check all the button's visual elements. If they have the 'Raycast Target' checkbox checked - Images, Texts, TexMeshPro's, and the likes - they might send events, too.