Search Issue Tracker
Won't Fix
Votes
0
Found in
6000.2.15f1
Issue ID
UUM-128975
Regression
Yes
368B of GC is allocated for each UI Document in the scene
How to reproduce:
- Create and open a new project
- Create a new UXML file in the Project tab
- Create a new UI Document GameObject in the Hierarchy
- Attach the UXML file to the UI Document Component in the Inspector
- Open the Analysis → Profiler
- Enter Play Mode
- Click anywhere on the CPU section in the Profiler
- Observe the Profiler
Actual result: 368B are allocated every frame
Expected result: 0B are allocated every frame
Reproducible in: 2023.1.0a15, 6000.2.15f1, 6000.3.0a4
Not reproducible in: 2023.1.0a14, 6000.0.63f1, 6000.3.0f1, 6000.4.0a5, 6000.5.0a2
Fixed in: 6000.3.0a5
Reproduced on: Windows 11 Pro (25H2)
Not reproduced on: No other environment tested
Note: GC.Alloc is called twice for each UI Document:
1. ”GUILayoutUtility.Begin()” - 288B
2. ”GUILayoutGroup..ctor()” - 80B
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
- IndexOutOfRangeException occurs when entering "<a></a>" tags in a TextMeshPro UI field
- Numeric property drag cursor gets enabled in the Inspector Preview window when the window is above numeric properties
- UI elements become unusable due to Object and Text Fields being set to empty/"0" when clicking "Reset" on their Components
- Scene Asset is not attached to a Lighting Data Asset for a URP Package Sample Scene
- Gizmos are not rendered for the Base Camera when using Camera Stacking
Resolution Note:
The GC allocs are caused by an editor-only OnGUI() call on UIDocument. This call was used to capture the display size, and have been removed in Unity 6.3. However, we won't backport the change since the allocation only affects the editor (the OnGUI() call is stripped from players).