Answer the question
In order to leave comments, you need to log in
How to get currently playing animation from Animator?
Tried to do like this:
animator.Play ("Create");
var hash = Animator.StringToHash ("Base Layer.Create");
var state = animator.GetCurrentAnimatorStateInfo(0);
while (state.fullPathHash == hash) {//тут false
Debug.Log ("1111");
}
Answer the question
In order to leave comments, you need to log in
You have already been answered with a comment, but if you fly there, read it to people for the future.
in theory, everything is banal. you thought that you had a "Base Layer" layer, but in fact you just have it "Base".
therefore, the line in the code should also be
var hash = Animator.StringToHash ("Base.Create");
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question