Search Unity

Access to atlas make by Sprite Packer

Discussion in 'UGUI & TextMesh Pro' started by tnbao91, Mar 27, 2015.

  1. tnbao91

    tnbao91

    Joined:
    Sep 5, 2013
    Posts:
    46
    I have 10 textures and they are packed to atlas (use Sprite Packer). I wanna change sprite at runtime but I don't know how to access to atlas and change source image of Image component.
     
  2. fffMalzbier

    fffMalzbier

    Joined:
    Jun 14, 2011
    Posts:
    3,276
    From my understanding the sprite packing tin a atlas is happening i the background and you have no access to the atlas.
    You just have to have a reference to the sprites like if they where not packed.
     
  3. tnbao91

    tnbao91

    Joined:
    Sep 5, 2013
    Posts:
    46
    What about drawcall if I do it ?