I have a StateMachineBehaviorScript that needs to check if an external boolean is true or false, and if false the current state needs to stop immediately to let the next state proceed.
I have tried using animator.StopPlayBack() if the condition is false and have tried it in both the entry and update but neither appear to be working, the animation still plays all the way through regardless of the boolean value. Thanks in advance for any help!
override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
{
if (!isReady)
{
animator.StopPlayback();
}
}