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
- Fog "Density" field dragging is too sensitive
- Webpage from example hyperlink is missing when opened in the Universal 3D sample template
- Console window loses focus of the last message when a lot of messages are shown in a row
- Shadow artifacts appear when using a merged mesh with a specific Near Plane value in the Play Mode in URP
- "TlsException: Handshake failed - error code: UNITYTLS_INTERNAL_ERROR" error when a lot of web requests are sent within a few minutes
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.