There's more...

It's important to make points visible to one another in order for the graph to be connected. This approach is also suitable for building intelligent graphs considering stairs and cliffs; it just requires the moving of the Load function to an editor-friendly class in order to call it in edit mode, and then modifying or deleting the corresponding edges to make it work as intended.

Take a look at the previous recipe's Getting ready section so that you can better understand the starting point in case you feel you're missing something.

For further information about custom editors, editor scripting, and how to execute code in edit mode, please refer to the Unity documentation, available online at the following URLs:

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.