0

5.6.1f1

926629

No

All canvases in the Scene is being Rebuilt

There are large CPU spikes related to UI. While trying to track down the symptoms, User has found out that Canvas.BuildBatch encompasses *every* active canvas in the scene and subsequently slows SendWillRenderCanvases.
The problem is that all canvases are being rebuilt rather than only ones in the relevant hierarchy.

The event which causes this appears to be the addition of a GameObject to a ScrollRect's viewport. It's expected in that case that only canvas ancestors of that node are rebuilt, not all canvas in the scene. The codebase does *not* call Canvas.ForceUpdateCanvases().