Animation Finish, Call Function. Unity 5

Hello,

With regards to the using Unity 5.2 I call my animation via script using

Animation.SetInterger(“String”, Int);

But how do I find out when the animation has finished playing.

I have seen a work around by passing a float into the animator and waiting for float to == 1. Is there a more flexible way to do this without using the system event?

See this: Unity - Manual: State Machine Behaviours and Survival Shooter Training Day Phases - Unity Learn more specifically Unity - Scripting API: StateMachineBehaviour.OnStateExit(Animator animator, AnimatorStateInfo animatorStateInfo, int layerIndex)

1 Like