Search Unity

Spritesheet, animations, and animation controllers

Discussion in '2D' started by Adman, Nov 17, 2013.

  1. Adman

    Adman

    Joined:
    Jun 1, 2013
    Posts:
    12
    I'm a little confused about the best workflow here.

    I have a spritesheet for my characters walk animation. There are 8 rows (up, down. left, right, and each diagonal), and each row has a few frames of animation.

    What I eventually want from this is ONE animation controller, and 8 animations, right? Then, in my controller, I can have each of the animations, and use a trigger or perhaps a direction value to jump from state to state.

    When I highlight the frames for one row of animation and drag it out, I seem to get an animation controller AND an animation clip. If I do this 8 times, then I get 8 controller, but I really only need one.

    What's the best workflow for this?
     
  2. Veli-

    Veli-

    Joined:
    Oct 24, 2009
    Posts:
    2
    You should start by selecting frames for the first animation clip and drag drop the to the scene.
    This will create an game object with the clip and controller.

    To add new animation clips to this game object, just drag drop selected frames on top the game object in the hierarchy view.
    This will add an new animation clip to the animator.

    Now you should see the clips in the mecanim, or use Animator.Play("my animation whatevah") to play it.

    I hope this helps :)
     
  3. Adman

    Adman

    Joined:
    Jun 1, 2013
    Posts:
    12
    YES! This is totally what I wanted. Thanks so much!