How can i make an AI jump in UNITY 2D Platform Game,Unity 2 AI chase Jumping

Hello guys. I am new to this think with Unity and have 0 skills in scripting. It will be much of a help if you manage to answer my question.

I build i game where i have 2 characters: Player and Enemy. I used Astar Pathfinder to make the Enemy chase the player around the level. However the Enemy should be grounded object that has to walk and jump over platforms i build . Once the Enemy hit shoot or catch the player the game should end. Anyways, the Enemy initially is chasing the player and everything looks fine, but when it comes to jumping on the platform i can not figure out how to do it and where to find an answer for this. Could please help me with this. I want make the Enemy to jump on platform while it chases the Player. I would appreciate any help i could get resolving this problem i have. Thank you very much

Stumbled across this while looking for a solution to make my AI double jump (my coroutine waits for him to land before doing the second jump).

Anyway, here’s what I have to make an AI enemy jump (assuming you already have him moving left or right, based on which side the player is in relation to him);

GetComponent<Rigidbody2D>().velocity = new Vector2(GetComponent<Rigidbody2D>().velocity.x, jumpHeight);

“jumpHeight” is a float value you’d create yourself. Whatever value you set it to will depend based on how high you want your character to jump.

Hope that helps!