Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Get animation length in Mecanim

Discussion in 'Scripting' started by Deleted User, Dec 14, 2012.

  1. Deleted User

    Deleted User

    Guest

    May I know the proper way to get the length of certain animation in Mecanim ? I've been using

    Code (csharp):
    1. animation["run"].length
    But after changing animation type from Legacy to Generic it doesn't work anymore.

    The error reported is NullReferenceException but I couldn't find other ways of getting info from Generic animation.
     
    Last edited by a moderator: Dec 14, 2012
  2. Deleted User

    Deleted User

    Guest

    Oh, I suddenly found that I could remove the animation component and use the animator component only. So my question becomes :

    How to get a list of all the animations used in the animator controller ?

    I want to get their duration and use in the itween function call.
     
  3. Lypheus

    Lypheus

    Joined:
    Apr 16, 2010
    Posts:
    664
    I'd like to know this as well - can we fetch the animator assigned to a particular state? For instance, if I have a state "Running" with an animation clip "run", is there a way to:

    AnimationClip runClip = animator.GetStateByName( "Running" ).clip;

    ?
     
  4. Lypheus

    Lypheus

    Joined:
    Apr 16, 2010
    Posts:
    664
    Ugh, so one way to do it is to handle the length when the state is the current state, something like:

    AnimatorStateInfo state = animator.GetCurrentAnimatorStateInfo( 0 );
    float oldLength = state.length;

    Doesn't help me much, I need to be able to adjust the length dynamically, maybe get the clip off that state (how??) then use THAT to adjust directly.
     
  5. schetty

    schetty

    Joined:
    Jul 23, 2012
    Posts:
    424
    i have this same problem. i am trying the to solve this but not yet get the solution. Please help me to do this.
     
  6. CG-DJ

    CG-DJ

    Joined:
    Jan 28, 2012
    Posts:
    73
    Has ANYONE found a solution yet?
     
  7. komodor

    komodor

    Joined:
    Jan 2, 2013
    Posts:
    36
    i am looking for it for days

    Animation is deprecated, Animator knows about current and next state ... so WHY is Animation deprecated when it's only way how to do what i need and Animator does not look to be doing it in near future ...

    sure there is a way, you can export all states in editor with all info, but it's so uncomfortable and very dirty solution if you are working in team

    so if anybody knows please help us :)

    Edit: i need to play animation by Play and CrossFade i don't use transitions, so there is not next state
     
  8. akyoto_official

    akyoto_official

    Joined:
    Feb 24, 2013
    Posts:
    52
    I'd be interested in a solution to this problem as well. In my case I need to get the length of an animation from the animator on the server side where the animator components are disabled. That means I can't use anything related to the current state.

    Currently the animation duration is hardcoded for each animation but that's not a real solution, it's a very dirty workaround for what should have been fixed in the API long ago. We need something like what has been suggested a few posts above mine already:

    Code (csharp):
    1. animator.GetLayer(0).GetStateByName("Running").clip.length;
     
  9. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    5,041
    You can use the internals if you dont mind using undocumented code:
    Code (csharp):
    1.  
    2. RuntimeAnimatorController controller = GetComponent<Animator>().runtimeAnimatorController;
    3.         if (controller is UnityEditorInternal.AnimatorController)
    4.         {
    5.  
    6.             UnityEditorInternal.StateMachine m = ((UnityEditorInternal.AnimatorController)controller).GetLayer(0).stateMachine;
    7.             for (int i = 0; i < m.stateCount; i++)
    8.             {
    9.                 // Obviously loading it depends on where/how clip is stored, best case its a resource, worse case you have to search asset database.
    10.                 AnimationClip clip = (AnimationClip)Resources.LoadAssetAtPath("Assets/Animations/" + m.GetState(i).GetMotion().name + ".anim", typeof(AnimationClip));
    11.                 if (clip)
    12.                 {
    13.                     Debug.Log(clip.name + ": " + clip.length);
    14.                 }
    15.             }
    16.         }
    17.  
     
  10. THoeppner

    THoeppner

    Joined:
    Oct 10, 2012
    Posts:
    205
    The problem with the Internals is that they aren't available in the relase version of you're game. They are just accessible if you run you're game in the Editor.
     
  11. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    5,041
    True but if you are working in release/runtime it seems simple strageies like putting the animation clips in a predictable place or using an info file would cater for most use cases. If your clips aren't changing then its not really an issue and if they are changing its very likely those changes need to go through the Editor where you could use the Internals classes to do any automatic packing/validaiton/file writing/etc.

    PS I'm not saying such access woulnd't be good but that in many cases a workflow can be created to solve the problems. For example @blitzprog could use a "hard coded" info file and use the internals approach to write this file every time a build is created.
     
    Last edited: Feb 10, 2014
  12. DomDom

    DomDom

    Joined:
    Oct 18, 2013
    Posts:
    33
  13. akyoto_official

    akyoto_official

    Joined:
    Feb 24, 2013
    Posts:
    52
    While this is true and certainly works for most applications, it doesn't solve the problem for situations where you don't play the animation.
    In my case the animations are available on the server side as objects but they are not played. For this scenario it would still be very handy to have an API like this.
     
  14. crandellbr

    crandellbr

    Joined:
    Apr 3, 2013
    Posts:
    137
    It's increasingly apparent while adjusting to new systems that Unity has a habit of taking two steps forward and one step back. All of the great features with Mechanim, and yet we can't do something as simple as get the length of an animation?
     
    Last edited: Jan 11, 2024
  15. The All Mighty John

    The All Mighty John

    Joined:
    Jul 1, 2014
    Posts:
    1
    I found a pretty simple solution, I'm not sure how it will work for every problem but you can still get the animation clip length directly by referencing the clip it self (Not through the state machine).

    Here we have an attack animation that is played in the Animator state machine by setting a bool to true, then using a coroutine we wait until animation has finished and then switch the bool back to false.

    In this implementation it is required that you set the 'attack' animation in the inspector to reference it, however if your animations are in the Resources folder then you can use the Resources class to load it in via script. Hope this helps.

    Code (CSharp):
    1. public class PlayerController : Monobehaviour {
    2.  
    3.     public AnimationClip attack;
    4.  
    5.     Animator _animator;
    6.  
    7.     void Start() {
    8.  
    9.         _animator = this.GetComponent<Animator>();
    10.     }
    11.  
    12.     void Update() {
    13.  
    14.         if(Input.GetButtonDown("Fire1")) {
    15.  
    16.             StartCoroutine(Attack());
    17.         }
    18.     }
    19.  
    20.     IEnumerator Attack() {
    21.  
    22.         _animator.SetBool("Attack", true);
    23.         yield return new WaitForSeconds(attack.length);
    24.         _animator.SetBool("Attack", false);
    25.  
    26.     }
    27. }
     
    DugelStudios likes this.
  16. laymanstermsplease

    laymanstermsplease

    Joined:
    Jun 20, 2014
    Posts:
    2
    how would one wait till the animation has finished once and then launch a projectile ate lets say an oportune time during said anmation ?would this code be the solution if i tweaked it or is there a nicer way ?
     
  17. IsGreen

    IsGreen

    Joined:
    Jan 17, 2014
    Posts:
    206
    I would use a Trigger, instead Bool.


    Mecanim new Trigger parameter explanation?
     
  18. Polantaris

    Polantaris

    Joined:
    Jun 25, 2013
    Posts:
    18
    So I tried this...and it doesn't work. I created a dummy class that had references to the basic animations that every character in my game will have, and then I have a method where I input an enum value and get the respective animation's length. I always get 0. No matter what. Everything is referenced correctly and it is the animations that are used in the state machine. I've set up default returns (in the case that some reference is missing) to 1.0f, but I never get that, implying that the animations are read and the animationClip.length is actually 0.0f. But this makes no sense, as even a single frame animation would be greater than that.

    Edit: Added a debug output of the AnimationClip.ToString(), and I get the correct animation name. So everything is correct but the clip's length is 0, which makes no sense as it is an actual animation.

    Edit 2: Nevermind, it works, I made a silly elsewhere (irrelevant to the topic so no details).
     
    Last edited: Jul 29, 2014
  19. Quassanex

    Quassanex

    Joined:
    Jan 18, 2015
    Posts:
    2
    Hey... its a bit late, but i found a kind of solution for this... You must declarate a "public animationClip" in your code, then make the reference to the clip from the inspector dragging the animation file into it.
    Then simply use "clip.lenght" for example to get the duration of the clip.
    It's the only way i found to do it.
     
    proyecto_4 likes this.
  20. akyoto_official

    akyoto_official

    Joined:
    Feb 24, 2013
    Posts:
    52
    This thread is about Mecanim animations being affected by speed, not animations in general.
    What you're talking about only gives us the base clip length, not the real length used in Mecanim.
     
  21. MadeThisName

    MadeThisName

    Joined:
    Mar 14, 2015
    Posts:
    115
    Well that's sadly disappointing. With 12,000 views you would think at least a Unity Rep would come on here to explain how to do this....and/or the best work around. Seems i am in the same boat. Its seems to me this question has been asked quite a few times and no solid answer as of yet.

    http://answers.unity3d.com/questions/444696/animation-length-mecanim.html
    http://answers.unity3d.com/questions/707450/how-to-get-length-of-animation-in-mecanim.html
    http://answers.unity3d.com/questions/628200/get-length-of-animator-statetransition.html
    https://www.reddit.com/r/Unity3D/comments/2rz19l/get_anim_length/
    https://www.reddit.com/r/Unity2D/comments/2owqnf/getting_the_length_of_an_animation_clip/
    http://answers.unity3d.com/questions/530751/end-of-animation-clip-using-animator-mecanim.html
    http://answers.unity3d.com/questions/692593/get-animation-clip-length-using-animator.html
    http://forum.unity3d.com/threads/animation-finish-call-function-unity-5.355184/#post-2299076

    Everything is a work around or the same guy(Probably employed by Unity) saying why don't use the Animation Event Behavior.

    So for now this is the best alternative:
    Code (CSharp):
    1. AnimatorStateInfo state = animator.GetCurrentAnimatorStateInfo( 0 );
    2. float oldLength = state.length;
     
    Last edited: Sep 21, 2015
  22. Bezzy

    Bezzy

    Joined:
    Apr 1, 2009
    Posts:
    75
    I've been trying to do this with a StateMachineBehaviour. I've tried setting the animator.speed to play back to my desired duration in the OnStateEnter, resetting it to 1 in OnStateExit.

    (This felt hacky - the reason to use a StateMachineBehaviour to mess with an individual state is to encapsulate that state's own behaviour, rather than affecting the root node. However, it was working in unity 5.1, and I couldn't find a better solution.)

    After the 5.2 upgrade, there's issues. (specifically it's in 5.2.1p4, but it was in previous 5.2 versions). Some sort of feedback loop between animator.speed and stateInfo.length...

    I set animator.speed in OnStateEnter so that the animation plays back for my desired duration. I use stateInfo.length to get the supposed length of the animation.( That works so long as animator.speed is set to 1 and there's no other speed modifiers on the state.)

    Then, in OnStateExit, I set animator.speed back to 1 so that the stateInfo.length is reset the next time that stateInfo.length is checked in the OnStateEnter.

    BUT! Here's the issue: the next time around, stateInfo.length reports itself as the value modified by animator.speed.

    And since my calculation for animator.speed is stateInfo.length/myDesiredDuration, this feeds back into itself, so every other loop, the state plays based off old data and it flip flops between the desired playback speed, and a ridiculous playback speed (either too fast or two slow).

    I think animator.speed is not updating the stateInfo.length between calls of OnStateExit, and the OnStateEnter of the very next state? And thus, stateInfo.length is reporting the OLD state length in the new OnEnterState. So if you try to manipulate animator.speed using that, you're going to have a bad time.

    --------------------------------

    Here's the animation state for my weapon system. It's in a sub state machine behaviour.


    upload_2015-10-15_14-29-49.png
    You fire. If your clip is empty, you go to reload. If not, you transition back into fire (the self-transition is necessary to trigger the OnEnter/OnExits again). All transition durations are zero length.

    Here's the debug log when I shoot four shots and reload:
    upload_2015-10-15_14-33-19.png

    It flip flops between two speed values on the firing loop. (It's meant to be a machine gun, but it sounds like ba-bang, bah bang). It gets even weirder when I let that loop all over again.

    So I can't actually use animator.speed to compensate for the change to stateInfo.length, because it still reckons it's "1" because I tidied up the change in the previous OnStateExit, but it hasn't updated the next stateInfo.length to reflect this.

    So I guess the only solution here, is to cache off your animation clip lengths on the initialization of the animator. Phew.

    I know it's a big complex system, but I really hope this can be fixed elegantly.
     
  23. bitbiome_llc

    bitbiome_llc

    Joined:
    Aug 3, 2015
    Posts:
    58
    Is this still an issue? I've been researching this for hours. I'm attempting to determine when a transition and animation have finished within a StateMachineBehaviour script. I got it "working"... but it seems overly complicated or that I'm approaching this wrong. Are we supposed to only use Animation Events?

    Here is my current solution
    I have an animation in that shakes a unit when they are hit. After shaking I need it to return to an idle state. There is a transition between the two states with no exit time. Using a OnStateEnter in a StateMachineBehaviour script I had to add stateInfo.length and the next clip from the animator to set an animationDone variable. In OnStateUpdate I then just check stateInfo.normalizedTime against animationDone. This allows the transition and animation to play through before returning to idle.

    Code (CSharp):
    1.  
    2.  
    3. private float animationDone = 1f;  //default just in case
    4.  
    5. override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) {
    6.    
    7.         if( animator.GetNextAnimatorClipInfo(layerIndex).Length > 0 )
    8.             animationDone = animator.GetNextAnimatorClipInfo(layerIndex)[0].clip.length + stateInfo.length;
    9.     }
    10.  
    11. override public void OnStateUpdate(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) {
    12.  
    13.         if( stateInfo.normalizedTime > animationDone )
    14.             animator.SetBool("DoShake",false);
    15.     }
    16.  
    17.  
     
  24. ArachnidAnimal

    ArachnidAnimal

    Joined:
    Mar 3, 2015
    Posts:
    1,766
    Wow, I cant believe that determining when an animation is done is so difficult to do using Unity.
    I am dynamically altering the speed of the animation, so I have no idea how long the animation will take.
    Currently, the normalized time reported in the animator is not correct.
    speed.png
    As you can see the reported normalized time jumps from 0.72 to 0.11 in the middle of animation.
    So I can't rely on that.

    There seems to be so many hacks to try to determine this.

    It shouldn't be this difficult.
     
  25. browne11

    browne11

    Joined:
    Apr 30, 2015
    Posts:
    137
    I'm trying to figure this issue out myself. I can't find any options to find the duration of an animation as previously posted.

    Is this problem still on-going?
     
  26. ArachnidAnimal

    ArachnidAnimal

    Joined:
    Mar 3, 2015
    Posts:
    1,766
    The only solution it seems is to add an Animation Events on the timeline. Put it at the end of the animation event to notify some script that an animation is complete or near completion. I had to resort to putting multiple events on a time line for each animation: at 25%, 50%, 99%. This lets me know when the animation has reached a certain percentage of completion. If you're dynamically setting the speed of the animation at runtime, I don't see any other easier solution at the moment.
     
    Last edited: Feb 5, 2016
    browne11 likes this.
  27. Kombee

    Kombee

    Joined:
    Feb 8, 2016
    Posts:
    1
    I knew I wasn't the only one looking for this feature. It simply seems so intuitive, but I guess I need to learn how animation events work instead of relying on "guessing" how long my animation will last each time. Thanks for the help anyways guys. I hope this becomes a feature in unity later on.

    Edit I've been looking at how events work, and it seems like it's sufficient for my needs so far. I'll have to test it out in unity first, but being able to actually run a chosen method at a specific point in an animation clip can solve my problem. I'd still have prefered the other option of simply getting the animation length though, as it would make more sense for me to program.
     
    Last edited: Mar 8, 2016
  28. bitbiome_llc

    bitbiome_llc

    Joined:
    Aug 3, 2015
    Posts:
    58
    Just a note on my experience with Animation Events in the timeline. They seem to work great if you are using an animator. If you for some reason use an animation directly on an object Animation Events seem to be hit or miss with my experience. I may be missing something though. Currently I always use the animator even if a simple animation by itself would be enough.
     
  29. ArachnidAnimal

    ArachnidAnimal

    Joined:
    Mar 3, 2015
    Posts:
    1,766
    IF I unerstand how it works, the animation event requires an animator. The script which recieves the event notification must also be attached to the same gameObject which has the animator. I could be wrong but after troubleshooting it, I arrived at this conculusion too.
     
  30. thexdd

    thexdd

    Joined:
    Mar 20, 2013
    Posts:
    19
    Here is what I came up with for this task. Thanks to Unity, they've let us write our custom yield instructions not that long ago, so, here is the class (custom yield instruction) itself:
    Code (CSharp):
    1.  
    2. /// <summary>
    3. /// Suspends the coroutine execution until currently triggered animation clip in the supplied animator evaluates to true.
    4. /// </summary>
    5. public sealed class WaitForAnimation : CustomYieldInstruction
    6. {
    7.       private Animator animator;
    8.       private string lastClipName;
    9.       private float innerTime = -1;
    10.  
    11.       public override bool keepWaiting
    12.       {
    13.           get
    14.           {
    15.               if (string.CompareOrdinal(animator.GetCurrentAnimatorClipInfo(0)[0].clip.name, lastClipName) != 0)
    16.               {
    17.                   if (innerTime == -1)
    18.                       innerTime = Time.realtimeSinceStartup + animator.GetCurrentAnimatorClipInfo(0)[0].clip.length;
    19.  
    20.                   if (WaitedFor(innerTime))
    21.                       return false;
    22.               }
    23.  
    24.               return true;
    25.           }
    26.       }
    27.  
    28.       /// <summary>
    29.       /// Creates a yield instruction to wait until currently triggered clip is played.
    30.       /// </summary>
    31.       /// <param name="animator"></param>
    32.       public WaitForAnimation(Animator animator)
    33.       {
    34.           this.animator = animator;
    35.           lastClipName = animator.GetCurrentAnimatorClipInfo(0)[0].clip.name;
    36.       }
    37.  
    38.       private bool WaitedFor(float time)
    39.       {
    40.           return Time.realtimeSinceStartup >= time;
    41.       }
    42.   }
    43.  
    As you should know, yield instructions are used in Coroutines, so here is the use case of my implementation:
    Code (CSharp):
    1. // Animator component of our car:
    2. private Animator carAnimator;
    3.  
    4. private IEnumerator CarExplosionExampleRoutine()
    5. {
    6.     // Trigger animator to start switching animations:
    7.     carAnimator.SetTrigger("Explode");
    8.  
    9.     // Wait for the triggered animation to be played:
    10.     yield return new WaitForAnimation(carAnimator);
    11.  
    12.     // Destroy the car:
    13.     Destroy(carAnimator.gameObject);
    14. }
    15.  
    WaitForAnimation(Animator) basically waits for blending\switching clip to be done, and then is waiting until the animation clip will be played.
    Hopefuly it will be useful for somebody out there.
     
    ArachnidAnimal likes this.
  31. ArachnidAnimal

    ArachnidAnimal

    Joined:
    Mar 3, 2015
    Posts:
    1,766
    This looks like it would work for an animator with a speed = 1. But, what about dynamically changing the speed during runtime? clip.length doesn't work anymore for this scenario.
    We need a clip.progress exposed to us which returns the current progress % of the clip.
     
  32. thexdd

    thexdd

    Joined:
    Mar 20, 2013
    Posts:
    19
    Thanks for the reply. If I get some time, I will think of improving it. And you are right, my implementation would work only if the speed = 1.
     
    Last edited: Jul 3, 2016
    ArachnidAnimal likes this.
  33. anasiqbal

    anasiqbal

    Joined:
    Jul 29, 2015
    Posts:
    6
    Hi,
    This might be late but I will still reply If someone is still looking.

    You can get current clip and its length using "Animator.GetCurrentAnimatorClipinfo". I know someone of you might have tried it but the thing is that you also need to consider the transition period.

    Screen Shot 2016-08-04 at 6.41.02 p.m..png

    See that there is a transition time between 2 states inside an animator.

    Here is the code to check it:

    Code (CSharp):
    1.  
    2. IEnumerator PlayAnimation(int parameterHash)
    3. {
    4.     animator.SetTrigger(parameterHash);
    5.     do
    6.     {
    7.         yield return null;
    8.         Debug.Log("Waiting for transition");
    9.     } while(animator.IsInTransition(0));
    10.  
    11.     Debug.Log("Clip Name: " + animator.GetCurrentAnimatorClipInfo(0) [0].clip.name);
    12. }
    13.  
    Here,
    animator is the reference to the Animator being used.
    parameterHash is the calculated hash value of a parameter name declared in my Animator. See "Animator.StringToHash"

    Hope it helps. :)
     
  34. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    7,462
    Bumping this because it is still broken.

    There is no way to get a consistent value returned when asking for the length of an animation.
     
  35. Symon231

    Symon231

    Joined:
    Jul 13, 2016
    Posts:
    6
    I also had issues with this time ago and as someone already suggested in one of the first replies I use RuntimeAnimatorController for my solution, however I don't make use of UnityEditorInternals

    In case people are still looking for a solution and bump into this post here's a video in which I show a full example in which I retrieve and store into a dictionary all the names and lengths of the animations contained in an animator controller.

    Video

    Hopefully this will help sombody!!!
     
  36. fwalkerCirca

    fwalkerCirca

    Joined:
    Apr 10, 2017
    Posts:
    57
    Well, add me to the list on this. I also needed to get the time it would take to play and animation. Maybe I am going about the whole thing the wrong.
    Essentially I need a queue of animations that will play one at a time. I was hoping to use the gameObject's (I use a pool) that are already queues in the "editor" and adding a delay to play an animation based on what's in front of it. Unfortunately I cannot do this, since I can't get how long it till take for each queued animation to play.
    So, I guess, in my new way I will have to define/create a queue and add the animation instances to the queue, and then have an event trigger when an animations is done playing? and fire a new animation at that time. I don't like it, because my game objects where in a queue already in the "editor" so now here goes another queue instance. And I am dealing with 1000s of objects (not the animations), instances are at a premium. :(
     
  37. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    This is how I did it today...
    Code (csharp):
    1.                 //set the new animation
    2.                 controller.Play(turn.SelectedAttack.attack_animation_name);
    3.  
    4.                 //give it time to start
    5.                 yield return null;
    6.  
    7.                 //now see how long the active clip is
    8.                 float move_end = controller.GetCurrentAnimatorStateInfo(0).length;
    9.  
    10.                 //and wait that long before ending the attack phase
    11.         yield return new WaitForSeconds(move_end);
    12.  
    ...of course, in my case I don't transition between clips, I just start playing them so I don't need to worry about the duration of the transitions. In my case I set the animation but it only becomes active the next frame so I wait 1 frame and then get the clip length. Nothing to it.
     
    Last edited: Feb 16, 2018
  38. Zullar

    Zullar

    Joined:
    May 21, 2013
    Posts:
    651
    I am also having this same issue on how to find the length of an animation clip.

    The end goal is to ~normalizing the duration of the animation regardless of the clip length (For example if an animation clip is 1.2sec long but I want the whole clip to play in 0.5sec then I will play at 2.4x speed). To get this to work I've hard coded all the animation clip lengths! (bad Idea I know :p).
     
  39. Andrew-Kite

    Andrew-Kite

    Joined:
    Oct 16, 2014
    Posts:
    34
    Slightly old discussion now, but I was having a similar problem where I needed to know the length of an animation for Menus to animate in/out at precise times.
    While the above GetCurrentAnimatorStateInfo() works after waiting for the next frame. This led to timing issues with my animations, even though it was a very small delay.

    After a few hours of investigation, I found this to be the best solution for me, without the need of waiting a frame

    Code (CSharp):
    1.  
    2. using System.Linq;
    3.  
    4. float clipLength = this.animator.runtimeAnimatorController.animationClips.
    5.                 First(clip => clip.name == "AnimNameHere").length;
    6.  
    Hope this helps someone!
     
    Apeles, SlamDewey, lpt0 and 1 other person like this.
  40. SlamDewey

    SlamDewey

    Joined:
    Dec 10, 2015
    Posts:
    2
    Thank you!
    This animation stuff isn't as documented as I would have hoped, and so I almost wrote my own animation controller (I already scripted a custom state machine, so it wouldn't have been so bad) but you saved me a bunch of time!
     
    Andrew-Kite likes this.