Search Issue Tracker
By Design
By Design in 2023.3.X
Votes
1
Found in
2022.3.13f1
2023.1.19f1
2023.2.0b17
2023.3.0a13
Issue ID
UUM-55657
Regression
Yes
”OnTriggerExit2D” is called after exiting Play Mode when trigger colliders overlap
How to reproduce:
1. Open the user’s attached “TriggerBug.zip” project
2. Open the "SampleScene" Scene (Assets > Scenes)
3. Enter Play Mode
4. Hold the “D” or “right arrow” button
5. When the Cube gets on top of the other Cube GameObject exit Play Mode
6. Observe the Console window
Expected result: “exited” log is not logged
Actual result: “exited” log is logged
Reproducible with: 2022.2.13f1, 2022.2.21f1, 2022.3.13f1, 2023.1.19f1, 2023.2.0b17, 2023.3.0a13
Not reproducible with: 2021.3.332f1, 2022.2.12f1
Reproduced on: macOS 13.5.2 (Intel)
Not reproducible on: No other environment tested
Note: not reproducible with “OnTriggerExit”
Comments (1)
-
theboxfriend
Nov 09, 2023 21:16
If this is intended behavior, is there a reason that the behavior is not the same for the 3d messages like OnTriggerEnter?
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
- Texture2D hash changes inside of an AssetBundle when rebuilding a SpriteAtlas bundle with an empty AssetPostprocessor Script enabled
- Aniso Level still applies when Generate MipMap is disabled in Texture Import Settings
- Mipmap Limit Groups long names are not truncated when creating a new Mipmap Limit Group with a long name
- “ArgumentException: Invalid double parameter.” error is thrown when Infinity is typed into the Fixed Timestep field
- GameObject becomes gray when using HDRP and STP together on macOS
Resolution Note:
https://issuetracker.unity3d.com/issues/ontriggerexit2d-not-called-when-colliders-are-disabled-due-to-getting-unloaded
Exit callbacks on any 2D collider should be called when the collider is disabled, the GameObject is destroyed or the scene is unloaded.
If you wish to avoid this behaviour then you can disable: https://docs.unity3d.com/ScriptReference/Physics2D-callbacksOnDisable.html
This change was as result of a fix via: https://issuetracker.unity3d.com/issues/ontriggerexit2d-not-called-when-colliders-are-disabled-due-to-getting-unloaded
Resolution Note (2023.3.X):
https://issuetracker.unity3d.com/issues/ontriggerexit2d-not-called-when-colliders-are-disabled-due-to-getting-unloaded
Exit callbacks on any 2D collider should be called when the collider is disabled, the GameObject is destroyed or the scene is unloaded.
If you wish to avoid this behaviour then you can disable: https://docs.unity3d.com/ScriptReference/Physics2D-callbacksOnDisable.html
This change was as result of a fix via: https://issuetracker.unity3d.com/issues/ontriggerexit2d-not-called-when-colliders-are-disabled-due-to-getting-unloaded