[RecastGraph] Changing cell size results in no meshes found in mask

Hey there!

I’ve noticed a weird issue when changing the cell size of a RecastGraph. When using the default of 0.5 everything works fine, but when lowering it to 0.2 I suddenly get flooded with errors like this:

No MeshFilters were found contained in the layers specified by the 'mask' variables.

There seems to be an issue with the function GetTouchingTiles of RecastGenerator returning a strange rect. Otherwise I have no idea what could be wrong. My current graph setting look like this:

Do you have any suggestions on how to debug this best?


I am also encountering another strange issue where updating the graph via GraphUpdateObjects seems to stop at a certain coordinate. Everything below the coordinate is fine, everything above seems to not register at all. Funnily the exact coordinate where this happens seems to depend on the character radius and cell size values.

Also when I rescan the whole graph at the exact same position, it registers all objects.

Does anyone by chance have an idea what’s going on here? I’m still not seeing any difference after a week of debugging.


I don’t think cell size is used at all for gathering the meshes so I’m confused as to how that can produce that warning…

Re the graph update object. Are you sure the graph’s bounding box doesn’t simply stop there?

Earlier versions have had bugs where they accidentally included some objects outside the graph’s bounding box. Make sure that the bounding box covers everything for best results.

Thanks for helping me out!

I’ve now found a workaround that seems to work, but I’m not sure if it’s a good idea performance-wise. The bounding box did enclose all the right meshes because when hitting ‘Scan’ it did find all walkable surfaces inside the volume.

When setting the bounding box to the largest map size possible (somewhere around 50048500) I seem to consistently get the correct results. Updating the graph via GUO also doesn’t seem to take any longer, so do you think there are any performance overheads if I only update a small area inside the large bounding box?

Updates to a recast graph are tile based, so as long as you are using tiles the update will only take time proportional to how many tiles the update touches (+ some overhead for updating some internal datastructures).

Okay, thanks a lot! I’ve not noticed any impact with the tile-based approach, so I should indeed be fine.