I’m running into an issue after upgrading a project to Unity 6. At first I thought some of my NavmeshModifierVolumes were being ignored by the NavmeshSurface bake, but after some tinkering it seems some objects entirely are ignored by the bake. It isn’t GameObjects either, because the wheels on the foreground car are being included in the bake, it’s just the main body mesh of the car that isn’t being respected. I have a script that spawns a bunch of things and all of them had NavmeshModifierVolumes before with space set as not walkable. I generate the navmesh at runtime because the level is built at runtime. The issue I’m facing is that some of the meshes/colliders are ignored completely during bake.
Pictured is after I’ve taken off the navmesh modifier volumes which is why it’s adding those little bits of navmesh on top of the hoods of cars and stuff, but that’s not the issue, the issue is like with the close car, that car is not seen by the navmesh at all when building. No matter what I do I can’t get it to recognize it, even rebuilding multiple times while playing. It’s made from the same exact prefab as the other two cars that are working correctly. The issue affects an arbitrary number of my spawned vehicles. I’m wondering if there is just a limit to the number of objects a navmesh surface looks at, but I don’t think that should be the case, since I’m pretty sure it worked fine before Unity 6. I can go back to a previous branch and check but I’m pretty positive this was all working flawlessly before. When I upgraded to Unity 6 I did have to remove the Navmesh Components library I had imported because it wasn’t compatible with Unity 6, but then I added the AI Navigation package which automatically swapped out the same scripts, NavmeshSurface, NavMeshModifierVolume etc.
Has anyone faced similar issues? I’ve of course googled for a solution but everyone else seems to just having issues with getting modifiers to affect the navmesh and I don’t necessarily have that issue. My workaround is to just convert to NavmeshObstacles with carve and I’m worried about performance implications of that, the cars don’t move though so it might be fine.
