Search Issue Tracker
By Design
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
- Inspector elements are rendered twice when the script component is added via drag-and-drop while the HideFlags.HideInInspector property is set
- Error "Light baking failed with error code 5 (Convergence data not available while rendering lightmaps)" thrown in Console when generating lighting for specific GameObjects
- Copy and Paste options for an Animation Property value are disabled in the Right click contextual menu
- Asset is not found when searching the Label "NewLabel" in Search Window
- "Compute dispatch: missing texture ID..." and "Compute dispatch: missing UAV ID..." warnings are thrown after changing the platform in High Definition 3D template
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