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
- Fixing Message Loss in UMPE During Domain Reload
- The Editor freezes when ScheduleReadOnly of IJobParallelForTransform with dependency is used
- Text is truncated in the Inspector when the display scale is set to 150%
- CancellationTokenSource(<timeout>) has incorrect cancellation status when used in WebGL Player
- VFX property value names are cut off when properties with 'Arc' are viewed in the VFX Blackboard
Add comment