- Home /
Baking NavMesh at Runtime: Connecting separate NavMeshSurfaces
The NavMeshSurface class: https://docs.unity3d.com/Manual/class-NavMeshSurface.html has an enum that lets you bake based on "All", "Volume" and "Children".
In my project I have to spawn in many individual objects that should then be baked to create 1 big NavMesh. However, there is 1 problem: Whenever I bake based on the Children of individual objects, the parent Object and children do connect, but do not connect to different Parent+Children object's NavMeshSurfaces. Where as selecting "All" does succesfully turn completely seperate objects into 1 NavMesh, but doesn't allow you to choose exactly which ones (during runtime).
foreach (NavMeshSurface nmsSurface in nmsList)
{
nmsSurface.BuildNavMesh();
}
Is there a simple way through which Surfaces of separate objects can be connected to each other by including them inside of a List, or is there another way?
(I'm aware of "NavMeshLink, but in this case, there are no jumps and everything could simply be 1 giant NavMesh.)
Your answer
Follow this Question
Related Questions
Trouble with Navmesh Agent and Navmesh Obstacle 0 Answers
Navigation Mesh + Doors 0 Answers
How to prevent a NavMeshAgent to constantly spin along its y axis? 1 Answer
Getting a navmeshagent back on a navmesh. 1 Answer
Unity Pathfinding One Way 0 Answers