crossfade animation not running correctly ,only getting to the first frame from 5 frames then the animation freeze and not looping

my code

       if(istherunkeyshift == true && istheupparrowused == true){

          animator.CrossFadeInFixedTime(thewalkcyclenancyfaster,0.2f);

          
          Vector3 destination = transform.position + transform.right * input.x + transform.forward * input.y;

          navMeshAgent.destination = destination;
          
       }

Hi,
I had the same issue.

It seems CrossFadeInFixedTime() can’t be called several times. (e.g. in Update/Coroutines/loops/etc.)
Each time CrossFadeInFixedTime() is called, it will start the animation again at the first frame.
It has to be called once.

I solved it with a check before the call:

void Update()
{
        if (anim.GetCurrentAnimatorStateInfo(0).IsName("Run"))
        {
            return;
        }

        anim.CrossFadeInFixedTime("Run", 0.1f);
}