IsPlaying doesn't return correct value when used together with CrossFade

animation.CrossFade(“attack”);

if(animation.IsPlaying(“attack”)) // If it’s called in the same frame of CrossFade, it returns false, which is incorrect.
{

}

// if the fade length is set <= 0.2, it’s alright, but with a value like 0.3, IsPlaying tends to return false at the beginning of the animation.
// please help. Thanks.

Ok, never mind, I figured it out. It’s because the fade length is larger than the whole length of my animation.