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
Comments (3)
-
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
- “Asset X has no meta file, but it's in an immutable folder. The asset will be ignored.” errors are thrown when importing package with files not listed in package.json's "files" property
- There is no way to adjust the HDR Paper White value of the Unity Editor's interface, making it difficult/uncomfortable for some developers to work on very dark/bright scenes in HDR
- Animator window has a dropdown button that throws “MissingReferenceException” error on a new project when the previous project had a GameObject with an animation
- Animator State name overflows outside the visual box when the State has a long name
- UI Document file remains marked as Dirty after Undoing made changes
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.