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
- Opening Terrain Prefab in Prefab Editing Mode throws "NullReferenceException" error
- [Search] Dragging query pills put them behind the search text field
- A CustomPropertyDrawer that returns a PropertyField for a property named the same as a child field will not render all child fields
- Graphics Settings shows default values instead of the real values in the Rendering Debugger when Volume.profile is assigned via script
- Deleting multiple Tags throws “NullReferenceException”, and "Retrieving array element that was out of bounds" errors when holding the Enter key
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.