Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Creating animation clip at runtime from sprites (2D)

Discussion in 'Animation' started by Mawkey, Nov 9, 2019.

  1. Mawkey

    Mawkey

    Joined:
    Apr 15, 2018
    Posts:
    15
    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:
    2,485
    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:
    15
    Yes but is this possible using sprites though? 2D animations with frames.
     
  4. Kybernetik

    Kybernetik

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

    Mawkey

    Joined:
    Apr 15, 2018
    Posts:
    15
    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:
    2,485
    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:
    15
    Sigh... I guess I have to use the legacy animation system. Great.
     
  8. CyRaid

    CyRaid

    Joined:
    Mar 31, 2015
    Posts:
    134
    It seems that way, and hope they don't deprecate the legacy animation system. It really would be nice to have access to the animation keyframes. (without worrying a system may be deprecated)