Search Issue Tracker
Fixed in 5.6.0
Votes
6
Found in
4.6.0b17
Issue ID
637042
Regression
No
OnTriggerExit2D is not happening when other colliding object is beeing destroyed
To reproduce this bug:
1. Open the attached project
2. Open 'OnTriggerExit2D' scene
3. Play the scene
4. Notice that object is instantiated and OnTriggerEnter2D is triggered
5. Notice when the object is destroyed OnTriggerExit2D is not triggered and does not work
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
- Crash on PrepareDrawShadowsCommandStep1 when entering the Play Mode in a specific project
- Physics Layer Collision Matrix's Layer names, checkboxes and hover highlights become misaligned when the Editor's UI Scaling gets changed
- Light/shadow information on an edge of a Terrain tile creates a seam with an adjacent Terrain tile when baking a LightMap
- "Missing types referenced from component UniversalRenderPipelineGlobalSettings on game object UniversalRenderPipelineGlobalSettings..." warning is thrown after switching the Platform to tvOS
- “Metal: Error creating pipeline state (Universal Render Pipeline/2D/Sprite-Lit-Default): Vertex attribute BLENDINDICES0(5) of type uint4 cannot be read using MTLAttributeFormatFloat2 (null)“ when setting GPU Skinning to GPU after opening the project
dmcguire3762
Dec 30, 2019 17:10
Unsure if this was not fixed at all for OnTriggerExit, but as HOTTABYCH mentioned this is still present in 2018.3.9
hottabych
Mar 29, 2019 11:39
2018.3.10, this bug still presents (for OnTriggerExit)
Zoser
Apr 29, 2016 00:05
This also happens when you disable the collider. OnTriggerExit2D is not called at all, though OnTriggerEnter2D is called when you enable the collider.
burritoco
Feb 08, 2016 04:49
I would love to know something about Unity's thoughts on this. This would be a very useful thing to have.
Cine
Mar 06, 2015 05:36
I presume it is intended, since the object didn't really exit, it just disappeared. Plus the fact that this happens during Physics update, whereas the destroy can happen in any phase.
But it would be really nice if there was an OnTriggerDisappear() that would be called when the collider is destroyed or disabled, or the game object it is on is disabled.