Search Issue Tracker
Fixed in 2022.2.X
Fixed in 2020.3.X, 2021.2.X, 2022.1.X
Physics2D.DestroyShapes() has an enormous impact on performances even when very few Physics Shapes Exist
1. Load the attached "TheBibitesDev.zip" project and download the attached "Broken.bb8settings" file.
2. Open the profiler.
3. Hit Play and Click on the Load Simulation Settings (occasionally you cannot click on it so pause/unpause the Editor and try again) and load the "Broken.bb8settings" file.
4. Click on the "Start" button (bottom right).
5. You must wait for a long time (approx 1 minute) for the project to initialize. Ensure the Status panel is on so you can watch the FPS. When it starts updating again then the test has begun.
6. Observe that over 30 seconds to a minute, the FPS will degrade down to a few FPS.
7. Alternately, spin-up the profiler and watch the time "Physics2D.DestroyShapes()" takes getting larger.
Expected result: There will be a gradual reduction however it won't be too severe.
Actual result: There is a sharp drop off in performance as the collider recreated load increases.
NOTE: The scripts shouldn't be doing continual rescaling and due to AutoSyncTransforms being used each query can cause this too so this is a bad code-path to be taking however, the performance impact of it should be improved.
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- [Linux] Android build fails with “CommandInvokationFailure: Gradle build failed.” error
- [iOS] Touch.rawPosition changes position when touch is dragged
- Loading a scene with a large amount of light probes causes a performance spike
- The player does not refresh window display properties when opening the Player on another display
- Spot Light flickers when when it's far from the origin point