Search Unity

2D charset on 1 png -> animation

Discussion in 'Immediate Mode GUI (IMGUI)' started by Chim, Jun 29, 2013.

  1. Chim

    Chim

    Joined:
    Jun 28, 2013
    Posts:
    1
    Hello community,

    I recently started a 2d game on an isometric map, so my hero will have 8 directions and like 5-10 sprite by direction.
    I got all my sprite on one png. And I searched everywhere on the net and i couldn't find how to make an animation out of my charset without cutting my charset in 50-60 separated sprite. Unity doesn't have interface for clipping?

    any idea?

    thanks.
     
  2. dkozar

    dkozar

    Joined:
    Nov 30, 2009
    Posts:
    1,410
    Yes it has. You have to use a texture atlas.

    Basically, you'll have to put all your images into the atlas. Then, you will use UV mapping to draw your images on screen.

    There are many frameworks already available for this, for instance SpriteManager.