Do Meshes have to be Read/Write enabled?

Hi - I’m trying to rescan my recast graph in runtime i.e. break a wall so the character should now be able to walk through it. As any part of a wall can be broken I figured I should rescan using the bounds of that piece of wall. However, when I do this, I get a bunch of read/write errors saying I need read/write enabled on all of the surrounding meshes.

I’ve read having read/write enabled on everything creates additional memory overhead so I’m wondering if I can avoid this but still update a portion of my graph in runtime?

NOTE - I’m not using NavMeshCut as I don’t think it scales to hundreds of meshes that could be moved/broken and I need to add back in walkable areas, not just remove them.

Appreciate any advice here! Thanks!

Hi

Instead of scanning meshes you can use colliders for this.
Simply disable ‘rasterize meshes’ in the recast graph settings and enable ‘rasterize colliders’.

Note that as long as you are using a tiled recast graph and the 100 navmesh cuts are not in the same tile, I think navmesh cuts are probably faster than recalculating tiles from scratch using a graph update.

1 Like