Hey everyone... how can i use animation transitions to "if()" conditions?

Say, i have an AnimatorController with multiple animations and transitions and i wanna move from transition to transition using buttons. how do i determine my current transition using script so i could base it to transfer to other transition?

thank you in advance :slight_smile:

if( anim.GetCurrentAnimatorStateInfo(0).IsName(“MyAnimationName”))
{
//Do something if this particular state is palying
}