PathBerserker2d  1.0
Platformer pathfinding solution
Setup

This page will walk you through the steps of setting up basic pathfinding in an existing scene.

  1. Add a NavSurface component to a Gameobject.
    All colliders that should be considered for pathfinding need to be children of the NavSurface component.
  2. On the NavSurface component click on the button labeled "Bake".
    You should see an outline appear indicating which edges are walkable.
  3. Optional: Place NavLinks to connect parts of the walkable outline.
    Make sure to place the start and end point of NavLinks close to the outline. If a point is to far from the outline, it will not be able to mapped at play time and the corresponding NavLink won't work.
  4. Add a NavAgent component to your NPC's.
    In order for the NavAgent to know where it is, it must be placed close to the outline, like the NavLink points.
  5. Give the NavAgent somewhere to go to.
    The easiest way to do this is to attach a RandomWalker component. It will cause the NavAgent to try and reach a random point on the walkable contour.

I highly recommend checking out the example scenes to see different setups in action.