Search Issue Tracker
Won't Fix
Won't Fix in 6000.2.X
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
- Texture Import Warnings are obscured by other Terrain Layer options in the Inspector
- Burst Inspector middle divider is jittering when resized with the Burst Inspector window docked
- JsonConvert conversion fails trying to call GetCallbackMethodsForType when [OnDeserialized] is used in a class
- Different text alignment in the column header in Entities "System" window
- Objects with Universal Render Pipeline/Particles/Lit shader are always lit up when changing their Rendering Layer Mask
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).
Resolution Note (6000.2.X):
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).