get any mecanim state by name or by something else ? (before i get in)

my code:

    if (duration > 0)
    {
        animator.speed = (animator.GetCurrentAnimatorStateInfo(0).length) / duration;
    }else
    {
        animator.speed = 1f;
    }

    animator.Play(animationClip,0,0f);

i can read the current animator state, but i’m not using transitions, so i don’t know the next state and i need to know how the animation i want to play is long before i play it

is there way how you can access any state in animator by name ?

I don’t think you can access the future states because it’s not decided that which state will be active yet.

Why do you need that? what are you gonna do with currently inactive states? If you tell, maybe I can help.