Animator play on script

I got an very simple issue on Unity Animator Play. It seems to be Unity Animator go through automatically only pre defined “Animation States”. But my issue from to try to play specific AnimationClip on MonoBehaviour script in game realtime. Is there a way to handle Animator.play on Mono like next pseudo codes?
ex)
void LateUdpate()
{
Animator anim = GetComponent();
if (Input.GetKeyDown(KeyCode.P))
{
// I want to handling AnimationCilp “Jump” here. But next code not working.
anim.Play(“Jump”, 0, 1.0f);
}
}

Any advises are welcome. Thanks.

thats more how the legacy animation works.

Although its completely doable in the new system if you setup the animator states and transitions correctly. You’d just call the relevant trigger parameter in the animator.

I see as you mentioned “You’d just call the relevant trigger parameter in the animator.” Thank you.