Search Issue Tracker
Duplicate
Votes
1
Found in
5.0.0f4
Issue ID
680880
Regression
Yes
OnCollisionEnter causes Unity to crash when there's many collisions
Steps to reproduce:
1. Open attached project's scene "Scene1".
2. Enter play mode.
3. Press and hold space key.
4. Unity crashes (on ~half a box filled usually)
Remove "OnCollisionWithObject.cs" script from Cube game object and Unity won't crash.
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
- [HDRP] Game view renders artifacts when Camera's Component "Post Anti-aliasing" is set to "TAA" and Dynamic Resolution's "Forced Screen Percentage" is changed
- A deactivated Prefab's name color becomes white when a GameObject in the scene is deactivated
- The Game view becomes blank when using Frame Debugger with MSAA and Texture binding enabled in Play Mode
- Crash on dynamixel_sdk.dynamixel:groupSyncReadTxRxPacket when entering Play Mode after updating path to Dynamixel SDK in script
- NullReferenceException is thrown when changing the Inspector preview selection
Laik
Mar 25, 2015 15:41
Where's the original this is a duplicate of? I've come across the same issue, calling any OnCollision function will cause Unity to crash if there are approximately 132 rigidbody objects. Commenting out the OnCollision(Enter/Exit/Stay) function stops the crashes, even when there are 500+ rigidbodies colliding!
I tested this in 4.6.1 and this crash does NOT occur. It's a new bug introduced in the Unity 5 release.