I want to make a function that returns true if an animation is currently playing or its playing a transition that have that animation as source or destination. For now, I using this code:
return _animator.IsInTransition(0) || animator.GetCurrentAnimatorStateInfo(0).IsName(anim_name);
The problem is that if the function is called asking for some animation, and the animator is currently playing a transition, it will return true.
So there’s the question: Is there some way to know if the transition that is currently playing is targeting the animation, or it’s the transition source? Or there’s some easier way to do it?
Thank you!!