Search Issue Tracker
Fixed
Fixed in 2022.3.62f1, 6000.0.49f1, 6000.1.2f1, 6000.2.0a10, 7000.0.0a27
Votes
0
Found in
2022.3.60f1
6000.0.44f1
6000.1.0b12
6000.2.0a7
Issue ID
UUM-101320
Regression
No
"OnTriggerExit2D" is called before "OnTriggerEnter2D" when object is destroyed immediately
Reproduction steps:
1. Open the attached “BugRepro” project
2. Open the “Assets/Scenes/SampleScene.unity“ Scene
3. Enter the Play Mode
4. Click the “Spawn” button in the Game view
5. Observe the Console window
Expected result:
{{Collectable-Script: Enter & Destroy}}
{{Player-Script: Enter InstanceID: <number>}}
{{Player-Script: Exit InstanceID: <number>}}
Actual result:
{{Collectable-Script: Enter & Destroy}}
{{Player-Script: Exit InstanceID: <number>}}
{{Player-Script: Enter InstanceID: <number>}}
Reproducible with: 2022.1.0a1, 2022.3.60f1, 6000.0.44f1, 6000.1.0b12, 6000.2.0a7
Reproducible on: Windows 11
Not reproducible on: No other environment tested
Workaround: Delay destruction in Collectable.cs using a coroutine:
{{private IEnumerator DestroyLater()}}
{{{}}
{{yield return new WaitForEndOfFrame();}}
{{Destroy(gameObject);}}
{{}}}
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
- var VisionOSEDRHeadromm has a comma instead of a dot when building with Metal Rendering App Mode and local OS localization is set to German
- IAP Catalog remove product “x” and add product “+” buttons are not consistent with other remove and add buttons in the Editor
- Performance issues in Play Mode when quickly hovering the mouse cursor over Hierarchy GameObjects
- Frame Debugger displays incorrect output when FidelityFX Super Resolution or Spatial-Temporal Upscaler is used with Temporal Anti-aliasing or Subpixel Morphological Anti-aliasing
- The layout system is failing to correctly calculate or apply the height of the Japanese fallback font when the primary English font's metrics are used
Resolution Note (fix version 6000.2.0a10):
Thank you for filing this bug report. I'm pleased to communicate that this issue is now fixed in 6000.2.0a10
Resolution Note (fix version 6000.1.2f1):
Fix for this issue is available on Unity 6000.1.2f1 and above
Resolution Note (fix version 6000.0.49f1):
Fix for this issue is available on Unity 6000.0.49f1 and above