Search Issue Tracker

By Design



Found in






Issue ID




IPointerExitHandler.OnPointerExit is called incorrectly when running via Script



How to reproduce:
1. Open the attached "" project
2. Open the "Scene" Scene
3. Enter Play Mode
4. Move the mouse pointer onto the colored Canvas GameObjects
5. Open the Console Window

Expected result: "Exit Parent" is only printed when you leave the whole canvas
Actual result: Once you enter the "Child" Canvas GameObject, "Exit Parent" is printed

Reproducible with: 2021.2.0a21, 2021.3.1f1, 2022.1.0f1, 2022.2.0a11
Not reproducible with: 2019.4.38f1, 2020.3.34f1, 2021.2.0a20

- Reproducible on a new project

  1. Resolution Note:

    We use "fully exited" flag to indicate pointer position. when "fully exited" =false, it indicates enter child elements even though it's still in the parent. when pointer is completely out, "fully exited" flag will be true. and therefore the additional call. We are planning to make a doc update though, for this change.

Comments (3)

  1. SnooksV3

    Jul 26, 2022 10:03

    Absolutely maddening change. Poor decision.

  2. Tanky

    May 10, 2022 15:32

    It took a little detective work but in case it helps anyone else, here is basically what the "resolution note" means. PointerEventData has been updated to contain a new boolean property called "fullyExited", which you can use like this:

    public void OnPointerExit (PointerEventData eventData)
    if (eventData.fullyExited)
    ; // execute previous behavior here

  3. Tanky

    May 09, 2022 22:24

    Could you explain that in more detail? What flags are you referring to? PointerEventData does not seem to have any flags.

    I am not familiar with "ono" nor can I access the link you posted.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.