Jump Left/Right

Hi guys

How can I make my rigidbody 2d character jump
Right or left.I know there’s addforce and stuff but how do I make it move left and right together while jumping?

Thanks

You could use the AddForce method, or you can set the velocity of the object, say if you want to jump right you’d set rigidbody2d.velocity = new Vector2(2,8);
this would jump 2 units to the right, and 8 up, adjust it as much as you need, and to jump left same as right but the velocity.x will be -2