Search Issue Tracker
By Design
Votes
4
Found in [Package]
1.0.0-preview.17
Issue ID
1368424
Regression
No
[UIR] Batches and Verts increase when hovering over buttons
Reproduction steps:
1. Open the user's attached project "Bug report.zip"
2. Open Assets > Scenes > test
3. Enter play mode
4. Open the "Stats" window
5. Hover your mouse on buttons and observe batches and verts in the Statistics window
Expected results: Batches and Verts stay the same when hovering over buttons
Actual results: Batches and Verts increases when hovering over buttons
Reproduced in: 1.0.0-preview.17 (2020.3.19f1, 2021.1.23f1, 2021.2.0b14, 2022.1.0a11)
Could not test with: 2019.4.31f1 (UI Toolkit is not introduced yet)
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
- Crash on AudioMixer::GetFMODChannelGroup when entering Play Mode in a specific project
- Prefabs with "Flags" enum properties result in "IndexOutOfRangeException" when trying to commit/revert
- The Camera first person mode in Cameras overlay is greyed out and not clickable when the Editor is restarted with the Game View focused
- Scene View doesn't select the Canvas when it's clicked with the View Tool
- Transform fields are impossible to edit when Inspector window is resized
Resolution Note:
Using transition on "all" properties with that amount of styles causes geometry to be regenerated each frame. Because the previous geometry may still be used by the render thread, we cannot touch it right away, and we allocate the geometry to another range in memory.
Having an "out of order" section in a render buffer is not breaking a batch in itself, but with the provided examples, the two first pages are close to be full to begin with. A third page is allocated for the geometry, and draw calls between pages do break batches as they are changing the GPU configuration and are way more expensive.
We intend on exposing control over the pages sizes and some allocation/defragmentation behaviors on the long run, as this would allow optimizing situation such as the one encountered.
For the time being, the allocations could be omitted if the transition occurs only on some properties. The transform (translate, rotate, scale) and colors usually are accelerated and don't need any geometry changes. Every changes that would affect the layout would guarantee some allocation at this moment (width, flex values, text size).