Play animations and blend trees with custom keybind system.

Hello I have a script where I allow players to assign keybinds how they want for walk jump and so on.
I want to be able to play animations properly if a key is pressed.
But all I can find is how to do it with the default system.
I want my animations to play and blend properly between each other as setup in the Animator.

How would I make a line like this do that.

 if (Input.GetKey(keyBackward))
            {
               // play animation here
            }

Note I don’t just want to play the animation I want it to blend properly like it works with the Animator.

Any help would be very appreciated. :slight_smile:

bump

bump