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
- Warnings in the Bug Reporter window are cut off and not truncated when the Bug Reporter window is resized to its minimum size
- Color is incorrectly applied to objects when initialized with non-normalized parameters
- SerializationUtility.GetManagedReferencesWithMissingTypes() don't return null when “Prefab has missing SerializeReference Types“ warning banner is present
- Memory leak when VFX Graph is open and Camera has "Target Texture" enabled
- The Canvas component's warning box is missing an apostrophe when Additional Shader Channels is set to "Normal" and "Tangent" with Render Mode set to "Screen Space - Overlay"
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).