Search Issue Tracker
By Design
Votes
0
Found in
5.6.3p4
2017.2.0a1
Issue ID
972372
Regression
Yes
Collision2D.contacts returns 0 for a gameObject, which is queued for destroying in the same frame
Reproduction steps:
1. Open the attached project "2DContactPointsDestroyBug.zip";
2. Open the Main Scene;
3. Enter a play mode;
4. Press "Run" buttons for each setup.
Expected results: Collision2D.contacts will return correct value for each setup as all of them have collisions;
Actual results: The 4th setup, where destroy is called before using Collision2D.contacts or Collision2D.GetContacts, fails to register correct contacts for the collision.
Workaround: Manually delay the Destroy call or get the contacts before calling destroy on the object, like in setups 1, 2 or 3.
Reproduced on: 2017.2.0a1, 2017.2.0p3, 2017.3.0b11, 2018.1.0a6.
Not reproduced: 2017.1 and lower.
Regression started: 2017.2.0a1.
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- “[Worker0] Could not generate preview image“ error when opening macOS native plugin in the Inspector with Architecture to build for set to ARM 64-bit
- [iOS] Application.absoluteURL is empty on Awake/Start when opening via deep link with Splash Screen disabled
- Crash on MemoryManager::Deallocate when rapidly calling Addressables.LoadAssetAsync
- Crash on physx::shdfnd::atomicIncrement when adjusting values on a character controller component after entering Play mode in Prefab edit mode
- [Rendering Debugger] [NewInputSystem] Debug Overlays in Play mode throws InvalidOperationException when using New Input System
Add comment