NavmeshPrefabs that use the same horizontal space overwrite each other?

  • A* version: 5.3.3
  • Unity version: 6

I’m trying to split up our Recast Graph using Navmesh prefabs.
Picture a house with various floors.
Each room is setup to have it’s own NavmeshPrefab (or in some cases for rooms which aren’t square, multiple NavmeshPrefabs).
In editor the graph preview looks perfect, but when the game loads and the NavmeshPrefabs are applied to the Recast Graph, it becomes incredibly patchy.

Looking at the code, RecastGraph.ReplaceTiles looks to me like it always replaces the tiles across the x and z, so multiple NavmeshPrefabs that occupy the same space will conflict. Is that correct?

If yes, my next question is: Is this by design and we should just accept it, or is it possible to fix so our use case is catered for?

For what it’s worth, we ended up not using NavmeshPrefabs but I’d still be interested to know about the above for future reference!

This is as designed right now.
But there’s not too much one would have to do to combine multiple navmesh prefabs to load into a single xz cell.

1 Like

Understood, thanks for the confirmation! For what it’s worth, it might be a good thing to clarify in the documentation, because I didn’t come across anything that explained it currently worked that way. I’m sure for a lot of use cases it isn’t a problem at all, but it did trip us up for a while.

I’ll tweak the documentation a bit :slight_smile: