Search Unity

Tile, Drawcall and batched ?

Discussion in 'Scripting' started by unitycodename, Feb 3, 2013.

  1. unitycodename

    unitycodename

    Joined:
    Feb 3, 2013
    Posts:
    2
    Hi all !

    I'm trying to do something similar to a system of tiles, with atlas image.

    Does anyone know how you can make a material applied to more than one object may have different offsets and tiling and remain still and not doing more batcheados drawcalls ..?

    I have this texture (for example), and I want an object to have the green and the other pink.


    if you change the offset is changed in two objects ...


    and if I change it by code, are no longer ... and I batcheados up the number of drawcall


    Does anyone know anything about this? How to make the atlas and do not create many drawcalls?

    PD: sorry for my poor English, I also posted in Spanish here:
    http://www.unityspain.com/index.php/foro/45-otros/38618-tile-drawcall-y-batched
     
  2. Gibbonator

    Gibbonator

    Joined:
    Jul 27, 2012
    Posts:
    204
    You won't be able to do this using material parameters. You will need to perform the texture coordinate transform in script and update the mesh uvs.
     
  3. unitycodename

    unitycodename

    Joined:
    Feb 3, 2013
    Posts:
    2
    Gibbonator: thank you, I do as you said !