Below is the setup for making the capsule move along ground, walk up the platform and avoid the red blocks. FYI, all the GameObjects in play are Cubes except for the player which is a capsule.
We need to bake the regions where the Player can move. Since the player should not hit the red objects, you will need to mark them as Static.
Everything that will be part of Navigation should be Navigation Static.
Next, go to Window->AI->Navigation and click the Bake button. You may need to edit its parameters to get the path that works for your game.
We will be using the Capsule as a Player. For it to move through the mesh we created, we will need to add a NavMeshAgent component on it and a script to listen to mouse clicks and respond to it.
Here’s the code that captures mouse clicks and passes its position to the NavMeshAgent:
Now my player can avoid red blocks and walk up to the platform.