With the advent of procedural-generated content, more specifically levels, it becomes necessary to come up with techniques that enable us to adjust the navigation areas. This is also important when we have very dynamic levels that can be destroyed in real time in a non-scripted way.
Creating and updating NavMesh data at runtime
Getting ready
It is important to have the NavMeshComponents directory in our project as shown in the previous recipe, Setting up our project.
Also, it is important to attach the NavMeshSurface component to all the parent objects we want to build the new navigation mesh with.