Too Many Batch and SetPass Call counts while using ScrollViews
Hi all,
I'm trying to create a simple scene with a scroll view. The problem is, when I add the scroll view to the scene, it causes excessive batch and setpass call counts.
There are 4 buttons in the scrollview content and they all use same sprite. The sprite has packing tag and in Editor settings, Sprite Packer Mode is set to Always Enabled.
When there is only the scrollview in the scene, there are 6 SetPass calls and 9 Batches:
If I add a button above the scrollview, SetPass call becomes 8 and Batches becomes 11. If I disable Mask component of Viewport, SetPass Call count decreases to 1 but Batch count is still high:
Can you please explain:
Why this single scroll view causes 6 SetPass calls and 9 Batches when I'm using packed sprite?
Why adding a button above and below of the scroll view increases both SetPass call and Batch count?
Answer by drHogan · May 02, 2017 at 10:43 AM
https://unity3d.com/learn/tutorials/topics/best-practices/optimizing-ui-controls
If you get to the bottome, I guess this more or less says a bit about it (i sounds like a mea culpa from the Unity guys for a bad optimized part of the the UI system)
Your answer
Follow this Question
Related Questions
NGUI 2.7 clipping with the new UI? 0 Answers
Set Unity UI scroll view elements height properly in different resolutions 0 Answers
ScrollRect view wrap content 0 Answers
How to clamp icon in minimap's border when the minimap shape is random? 1 Answer
How to incress scroll wheel viewport without incressing the size 0 Answers