Unity 2021.2.17f1 break pointer events

In Unity 2021.2.16f1 everything works perfectly, but after update to Unity 2021.2.17f1, pointer events are working in a weird way.

public void OnPointerEnter(PointerEventData d)
{
}

public void OnPointerExit(PointerEventData d)
{
}

Are you aware of this problem?

Thanks!

I have done some tests and the problem is OnPointerExit() is called when you enter with the mouse, but you don’t have move pointer out.

I have encountered the same problem.

OnPointerExit() worked correctly for me in Unity 2021.2.14, but is broken in 2021.2.17.

I opened a request trying to explain the encoutnered bevhaiour best as I could. The request-link unity sent me via mail is (at the time of posting this) not available. Maybe they need some time to permit the request/ issue?

You can use eventData.fullyExited in some cases to restore the previous behaviour. This only works, if you don’t want the child of the gameobject (which has the script containing the OnPointerExit method attached) to execute the same behaviour as the parent.
I’m currently working on a solution if you want that to be the case.

Related discussions of most likely the same change in pointer event behavior which started somewhere between 2021.2.x or 2021.3.0 : Problem with IPointerEnterHandler IPointerExitHandler and SetActive EventSystem unexpecteldy calling IPointerExit in 2021.3.1f1

1 Like