Search Unity

How UI batching works with different sprites ?

Discussion in 'Unity UI (uGUI) & TextMesh Pro' started by BenouKat, Jun 12, 2015.

  1. BenouKat

    BenouKat

    Joined:
    Feb 29, 2012
    Posts:
    218
    Hi there,

    I'm working on UI, and I'm facing a problem of comprehension :

    I have two Image with different sprite (but sprites are from the same sprite pack), I display them in a canvas set in World Space mode : 2 batches. Overlapped or not.

    Why ? I read a PDF from Tim Cooper for an Asian presentation of how UI Batching works. I followed every steps : Same material, same texture (because it's in the same sprite packer), it's coplanar to the canvas, ... What do i miss ?

    Batching works because if I put the same sprite on the two Image components, I got 1 batch. But if I put another sprite (but still from the same sprite pack), editor show me 2 batches.

    Can someone helps or explain this ?

    Thanks a lot community ! :)
     
  2. iivo_k

    iivo_k

    Joined:
    Jan 28, 2013
    Posts:
    312
  3. blizzy

    blizzy

    Joined:
    Apr 27, 2014
    Posts:
    775
    What do you mean by "same sprite pack"? The sprite packing tag?
     
  4. BenouKat

    BenouKat

    Joined:
    Feb 29, 2012
    Posts:
    218
    iivo_k : Oh known issue ! Cool thanks, didn't notice :) I'll post there

    blizzy : Yep, so they are part of the same big texture.
     
unityunity