How to change speed of the specific state in animator

I have access to anim animator from my script.
anim.speed functionality changes the speed of all states at the same time.

How to pick only one state from animator and change sped only for that state?

i assume that you have various if statements, or things like that to activate each animation

even if it’s not an if statement couldn’t you just increase the speed whenever you play it, and slow it down, when your not? i don’t see why you need to access one clip

or, heck you could just check and see if it’s playing or not

just use Animation.isPlaying

if (anim.IsPlaying("fast animation")){

          anim.speed = 2;


}else{

          anim.speed = 1;

}

hope this helps