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
- Joint Physics result in unexpected behaviors when used for articulated vehicles like buses or trucks
- Standalone Player crashes with "TDerived GetOrLoad<TDerived>() where TDerived : T" when IL2CPP Code generation is set to "Faster (smaller) Builds"
- IndexOutOfRangeException and InvalidOperationException when logging XML string
- Script missing in "Assets/Settings/Mobile_Renderer/GlobalVolumeFeature" of "com.unity.template.urp-blank" template
- “Font Asset Creator - Error Code [Invalid_File_Structure]…“ error is logged when generating Font Assets from fonts which worked with TMP Font Asset Creator
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.