How can i add different jumping state in unity3d

i need to add different-different jumping state in my animator controller and how can i call all the jump state by pressing space key in the keyboard. I mean jump will come randomly.

I’m assuming you have multiple animation states already set up in your animator controller, for example, Jump_01 or Jump_02. And what you want is when you press a button or key to jump, a random animation is played?

If so, one way of doing so would be to have a different trigger parameter which transitions to each jump animation. In the code, you would store these parameter names, possibly in an array, and when jump is triggered, you would choose a random parameter from your array and tell the animator to trigger that parameter.

Pseudo Code:

string[] animParameters = { jump_01, jump_02 }; // Trigger Parameters

void OnJump()
{
  int randomJumpAnim = Random.Range(0, animParameters.Length); // Choose a random parameter from the array
  gameObject.GetComponent<Animator>().SetTrigger(animParameters[randomJumpAnim); // Tell the animator to trigger it
}