Updating designated part of NavMesh during runtime

Hello, I’m curious if there are any ways to update only a small part of a Unity NavMesh during runtime since I’m using NavMesh Modifiers and I have to rebake the NavMesh every time I spawn a new modifier. I’m wondering if I could only update the area surrounding the new modifier instead of rebaking the entire NavMesh.

I know I’m able to use the Local NavMesh Builder Script, but that script is too expensive for my game in its current state when it functions during runtime.

Maybe this can be done through the NavMeshBuilder.UpdateNavMeshData() function?


Thanks for your help!

If it’s a navmesh obstacle you shouldn’t need to rebake , just turn on carve… (although if it completely blocks off portions of your map then you would). I’ve personally never used more than one navmesh surface in a scene but I’m certain you could use a few different surfaces and just bake one of them.

Instead of updating the NavMesh Modifiers every time they’re spawned, I chose a time to update the NavMesh where the performance difference won’t be noticeable thanks to @ray2yar’s help.