Search Issue Tracker
By Design
Votes
0
Found in
2019.4
2020.3
2020.3.11f1
2021.2
2022.1
2022.2
Issue ID
1379447
Regression
No
UGUI updates batches when every Camera.Render call is made
How to reproduce:
1. Open the user's attached project
2. Open scene Scene2
3. Go to Window -> Analysis -> Profiler
4. Enable recording profiling information while in Play mode
5. Press the Play button, then Pause
6. Go to the Profiler
7. In the Profiler Hierarchy, search for UGUI.Rendering.UpdateBatches, and observe the number of calls
Expected result: UGUI.Rendering.UpdateBatches is called once
Actual result: UGUI.Rendering.UpdateBatches is called 1+8 times
Reproducible with: 2019.4.34f1, 2020.3.26f1, 2021.2.8f1, 2022.1.0b4, 2022.2.0a2
Comments (1)
-
AsherBurdickMohawk
Dec 15, 2022 17:43
This is highly undesirable when using Camera.Render() to do offscreen work for various rendering techniques that don't render UI. Perhaps this is better explained as a feature request: allow UI events to be optionally disabled when calling Camera.Render()
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
- After converting a Built-in project to URP render texture related errors are spammed that can lead to Game view being rendered on top of Scene view
- UI Builder slider value lags and stutters when sliding/modifying certain property values
- "Reset UI Builder Layout" functionality inconsistently changes Canva Size when "Match Game View" is enabled/disabled
- 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
Resolution Note:
Calling Camera.Render forces the UI to update outside of its normal loop. It check to ensure things are updated not that its necessarily rebuilding that just the name of the function. It can early out.
As for emitting to camera that again is how it works in the back end. We need to emit the geometry to the camera as after each render the render queues are cleared.