Playing around with a procedural generated dungeon, and need navmesh after generation.
Recently i started using 2020LTS and found NavMeshBuilder.BuildNavMesh is not a thing anymore.
so when i
Using Unityengine.AI;
I can only use BuildNavMeshData now…
No usefull information found in the documentation… Any ideas?
So does this mean NavMeshBuilder isn’t something that will function at runtime?
Working on something with procedural levels (and Bolt Scripting) and all the bits and pieces seem to be there, but I can’t seem to get any of it to work
Edit: I was doing some digging and it looks like you need to use an external package? NavmeshComponents?
No, you can use NavMeshBuilder at runtime, there are just some methods, like BuildNavMesh, that are not available at Runtime. You can see AI Series Part 14 for how you can use NavMeshBuilder at Runtime.
NavMeshComponents are a set of helpful tools that improve your NavMesh working experience, but I don’t think they’re required for NavMeshBuilder.
If it’s generated at runtime, yes I would use NavMeshBuilder.
To achieve that you’d register some NavMeshData with the NavMesh, then use the NavMeshBuilder to update the NavMeshData you registered and the NavMesh will update
I did find another solution using Navmesh Components. If you get the package, you can simply attach the NavMeshSurface component, bake the NavMesh in the prefab (although it’s important to note the PreFab won’t show the baked NV for some reason)
from there I just of run my map builder algorithm and the PF’s come with the NV’s ready to go.
I wonder why it’s still a preview package, as it seems to work quite reliably.