Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Help Wanted NavMeshBuilder.UpdateNavMeshDataAsync updates the base mesh, ignoring previous iterations

Discussion in 'Navigation' started by BinaryEclipse, Oct 14, 2020.

  1. BinaryEclipse


    Sep 1, 2016
    In my game, players can place roads, which agents will prefer to walk on rather than the terrain. My road prefab has NavMeshSourceTag and NavMeshModifier. I have a huge map, so I want the bounds passed to UpdateNavMeshDataAsync to only encompass the new road to be performant. This works... the first time. After the second road is placed and UpdateNavMeshDataAsync is called, the navmesh under the first road is reverted to the default area cost again. Is this not possible to do? I already tested as a stress test, and doing the whole terrain is far too expensive - it took almost an hour and made my pc unusable. Putting an obstacle carves the navmesh out of the box - I'm surprised that modifying the area cost can't be similar.