Search Issue Tracker
By Design
Votes
1
Found in
2021.2.0a21
2021.2.19f1
2021.3
2022.1
2022.2
Issue ID
1419953
Regression
Yes
IPointerExitHandler.OnPointerExit is called incorrectly when running via Script
How to reproduce:
1. Open the attached "1419953.zip" 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
Note:
- Reproducible on a new project
-
SnooksV3
Jul 26, 2022 10:03
Absolutely maddening change. Poor decision.
-
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
} -
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
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Inconsistent NullReferenceException while connecting Edges in the Graph
- Output Decals URP link in Learning Templates directs to HDRP Lit Decal Documentation
- Performing Undo Redo for Convert to Property action creates a ghost Node
- Crash on GameObject::IsActiveIgnoreImplicitPrefab when opening a specific project
- Default Input Action Asset creates unsaved changes when clicking on Button actions
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.