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.
- [IL2CPP] Building fails when local functions in method with SystemAPI() are used
- Context menu should open on mouse down instead of mouse up on MacOS
- Cannot change Listview/TreeView selection with Right-Click mouse down
- Black screen in the Game view when using Blitter.BlitCameraTexture
- Layout elements are missing when the VFX Graph Window is docked horizontally