When I follow the tutorial, the animation does not play as expected. I have set Idle as auto-loop, and smile as non-auto-loop, but the CrossFadeQueued doesn't seem to be working as expected -> Smile never plays. I am using Unity 2021.3.1f1. I can send the project over to you if you want/ provide me with the contact details.
I.e. for the section of code:
if(!potrait.IsPlaying("Smile"))
{
Debug.Log("Playing Animation");
potrait.CrossFade("Smile", 0.2f);
potrait.CrossFadeQueued("Idle");
}
It does not seem that the idle animation is waiting for the smile animation to complete before playing. I.e. CrossFadeQueued doesn't seem to be working as expected. I.e. "Idle" overwrites the "Smile" animation, so that only "Idle" plays.
When I remove the Idle line, the smile plays as expected, however, ("Smile") starts looping after it plays even though I did not set it up as Looping.
if(hitResult.collider == colliderHead)
{
if(!potrait.IsPlaying("Smile"))
{
Debug.Log("Playing Animation");
potrait.CrossFade("Smile", 0.2f);
// potrait.CrossFadeQueued("Idle");
}
}
Hey thank you for the clarification, that has fixed my problems. I thought the Root Unit controlled the loop functionality, but it was the animation. The animation plays as expected now after that fix.
The tool is great btw, and the tutorials are really helpful. Thanks a lot for your work!