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
- Too little validation messages in the "WebAssembly Language Features" Memory settings
- Project Settings Search Highlights are misaligned when using the Bitmap Text Rendering Mode
- "GetControlID at event ValidateCommand returns a controlID different from the one in Layout event" Warning is thrown when undoing the deletion of Sprite Shape Profile
- Memory related fields in the "WebAssembly Language Features" can be set to the negative numbers
- "WebAssembly Language Features" Header in the Player Settings has a smaller indentation
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