Search Issue Tracker
Won't Fix
Votes
1
Found in
2018.4
2019.4
2020.3
2021.1
2021.1.7f1
2021.2
2022.1
Issue ID
1345993
Regression
No
Editor Play Mode performance drops after expanding Physics component's "Info" or assigned material sections in the Inspector
How to reproduce:
1. Open the user attached project (Unity 2021.1.7f1 - FPS drop on Rigidbody2D Info section display.zip)
2. Open the "SampleScene"
3. Select the "LaggyInspectedObject" in the Hierarchy
4. In the Game view open the Statistics window by pressing the "Stats" button in the top right of the view
5. Enter PlayMode
6. Try opening and closing the "Info" section of the "RigidBody 2D" and "Circle Collider 2D" components observing the change in FPS shown in the Statistics window
Expected result: the FPS stays the same
Actual result: the FPS is lower when the "Info" section is open
Reproducible with: 2018.4.35f1, 2019.4.29f1, 2020.3.14f1, 2021.1.13f1, 2021.2.0b3, 2022.1.0a1
Notes:
1. Reproducible on Ubuntu 18.04 and Windows 7
2. Issue is present after expanding both 2D and non-2D physic's components "Info" sections, a GameObject's assigned material section, or keeping a dropdown element open
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
- [Quality Hackweek] Errors "InvalidOperationException: EnsureRunningOnMainThread can only be called from the main thread" and "NullReferenceException" shown when switching build platforms with Muse Texture package installed
- "Importer(DefaultImporter) generated inconsistent result for asset" warnings are thrown when reimporting the "URP" texture
- Material property block emits and reflects incorrect color when baked Indirect Light is used
- DLL and Render Pipeline reload execution order is incorrect when loading RenderDoc
- [Quality Hackweek] [macOS] The letter ‘p’ is not continuously entered in a sticky note when holding the ‘p’ keyboard key
Resolution Note:
I added 2 profiler deep profile for redraw of inspector between 2019.4 and 2022.1. 2022.1 is a bit faster.
Some explanations:
- Inspector Window by default draws itself 10 times a second
- A component can request the Inspector to redraw itself as much as possible (RequestConstantRepaint)
- Physics Collider, RegidBody and some other components are using the RequestConstantRepaint to ensure some values that might change dyanmically are properly repainted.
So current behavior is expected: InspectorWindow redraws itself each frame and the more content it displayes the longer it is to repaint. I tried to find "local" optimization that could be done in the code of the Collider Component but the code is really tight.
There is an initiative to redo most of the Components Editor with UIToolkit which should help in terms of performance. For the time being this needs to be closed Won't Fix