Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Creating animation clip at runtime from sprites (2D)

Discussion in 'Animation' started by Mawkey, Nov 9, 2019 at 11:53 PM.

  1. Mawkey

    Mawkey

    Joined:
    Apr 15, 2018
    Posts:
    7
    I read about this from a forum post from 2016 that asked this and a developer responded with:

    "Unfortunately, it is not possible at the moment to create an animation clip at runtime.
    This is something we want to fix but haven't had any time yet to do it"


    Is it still not possible to create animation clips using sprites at runtime?
     
  2. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    587
    You can create Legacy clips at runtime (you always could), but still not Mecanim ones (for Humanoid or Generic rigs).
     
  3. Mawkey

    Mawkey

    Joined:
    Apr 15, 2018
    Posts:
    7
    Yes but is this possible using sprites though? 2D animations with frames.
     
  4. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    587
    Sprite animations are still AnimationClips so they follow the same rules.
     
  5. Mawkey

    Mawkey

    Joined:
    Apr 15, 2018
    Posts:
    7
    Would you be willing to give a quick example how I can bind my sprites(frames) to the animation clip?
     
  6. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    587
    I've never actually done anything like that so I can't help you there I'm afraid.
     
  7. Mawkey

    Mawkey

    Joined:
    Apr 15, 2018
    Posts:
    7
    Sigh... I guess I have to use the legacy animation system. Great.