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
- Required SpriteMask class (ID 331) is stripped when "Strip Engine Code" is enabled
- “Maximized serialized file backup not found” error is thrown when minimizing a window in a newly opened project
- Build stack trace contains invalid lines when building with IL2CPP using scripts with delegates containing generic types in the signature
- Entities Systems window has a “Show Full Player Loop” dropdown which does nothing when clicked after enabling “Show Full Player Loop”
- Entities Hierarchy Search “Show/Hide” button’s Lens Icon is blurry when the Editor is on an external monitor
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).