Search Issue Tracker
In Progress
Fix In Review for 6000.2.X
Under Consideration for 2022.3.X, 6000.0.X, 6000.1.X
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);}}
{{}}}
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Manual reference page for Grid Selection is missing
- Awaitable.NextFrameAsync causes GC Alloc 0.7 KB when using CancellationToken
- Prefab "Overrides" list item popups are overridden when navigating with keyboard arrow keys
- Alpha Tolerance setting does not affect generated outlines when generating Custom Physics Shape in the Sprite Editor
- The information/help message section misses a margin in the "Profiler" window
Add comment