How to do it...

We need to connect one NavMeshSurface component to another one:

  1. Locate, via the editor or code, two NavMeshSurface components to connect
  2. Add the NavMeshLink component to the object that will work as the origin
  3. Select the agent type that will be able to use the connection
  4. Set the Start Point and End Point values
  5. Repeat the previous steps for every agent type for which you need to connect the nodes

Get Unity 2018 Artificial Intelligence Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.