Search Unity

Batch and SetPass Call counts while using ScrollViews

Discussion in 'UGUI & TextMesh Pro' started by dogramacigokhan, Oct 1, 2016.

  1. dogramacigokhan

    dogramacigokhan

    Joined:
    Nov 22, 2014
    Posts:
    3
    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?
     
    TanselAltinel likes this.