NavMesh Modifier not changing navmesh

I’m working on a city builder, and I’m beginning to implement roads for faster travel within cities.

I’m trying to attach a NavMesh modifier in order to make the certain area where I placed the road a “Road” Area Type which would enable faster movement for a Humanoid agent. When I instantiate a Road gameObject (as a child of an empty gameObject) with a NavMesh Modifier component attached the NavMesh doesn’t change.

Road GameObject Configuration:

Configuration

(broken link removed)

Configuration (Continued)

(broken link removed)

I’m using a NavMesh Surface and updating it every time I instantiate a Road gameObject. The NavMesh Surface is attached to a gameObject.

This is the configuration of my NavMesh:

NavMesh Configuration

(broken link removed)

If any more information is needed, just comment and I will be happy to add! Thank you for your help!
(NavMesh Modifier Volumes don’t work either, although properly configured)

I don’t have a full solution but i think you need to mark the road prefab as navmesh static (where it says static at the very top right in the inspector)

if you did happen crack this in the past 454 days please do share. I’m working this same problem for the same genre of game we might need to call updateNavmesh in the navmeshSerface script and make some edits to that script but and it might not update instantly but it should be fine for city builders to run it in the background.

Encountered this same problem. Here’s how I was able to resolve it in Unity-2019-3

  1. Create a NavMesh Surface (GameObjectAINavMesh Surface)
  2. In the Hierarchy, transfer existing GameObjects with a NavMeshModifierVolume component to the NavMesh Surface created in step 1 (i.e. make them child objects of the NavMesh Surface from step 1)
  3. Bake the navmesh again. (note: I did this from the Inspector window, not the Navigation window. In the Hierarchy, select the NavMesh Surface created from Step 1 and there should be a Bake button in the Inspector window)
  4. Delete the old navmesh surface by going to the folder of your current scene and deleting the old NavMesh file (the new navmesh has a suffix "-NavMesh Surface", the old one doesn’t)

cc: @o0oradaro0o

Side note:

OP seems to already have a NavMesh Surface. he might need to do only step 4 below

I’m also having this problem, I’m calling NavMeshSurface.UpdateNavMesh() on Update() so I can see the navmesh surface bake changing.

I have an instance of the object with the modifier (which is the rock) in the scene that is affecting the navmesh surface. If I duplicate the rock in play mode and move it, the navmeseh surface is affected by the duplicated rock;

However, all of the instantiated rocks (navmesh modifier attached) do not affect the navmesh surface.

The version I’m using is Unity-2022-3-LTS (2022.3.28f1)