Hi!
I have a problem with the animator. I want to execute a clip when a previous one has finished. To do so I wrote this code:
anim1.SetTrigger(“first_trigger”);
print(anim1.GetCurrentAnimatorClipInfo(0).Length);
yield return new WaitForSeconds(anim1.GetCurrentAnimatorStateInfo(0).length);
anim2.SetTrigger(“second_trigger”);
The problem is that anim1.GetCurrentAnimatorStateInfo(0).length gets the length of the default clip, not the clip that is already playing. Do you know why?
Thank you very much!!!