Recast Graph vs Unity's NavMeshSurface Performance

Hello I’m recently coming back to this project after a couple of years. At the time I bought this package but ended up not working out for me because in my use case I need extremely fast updates for the Recast Graph. Because my game has real-time building I need the nav mesh to update in the next frame.

Tinkering with the recast configurations (rasterizing colliders, tile size 32, multithreading) I was able to reach 2 or 3 frames (around 70ms) depending on the situation, but Unity’s nav mesh surface always completes in 1 frame (between 20 and 50ms).

Is there something else I’m missing with regards to improving the Recast Graph performance further?

Hey there, welcome back- to both your project as well as the forum! A few notes for you:

  1. If you haven’t seen, there was a large 5.0 update earlier this year, and one of the changes was an update to Recast graph scanning using the Burst Compiler. If you’re still under 5.0, try that and see how it goes! Here’s a link to the blog post for that update.

  2. For your use case, you may want to look into scanning once on Start, then using various techniques to update the graph without completely rescanning it. You can read about different options and methodologies for achieving that here.

Hope this information helps. If not, keep us posted :saluting_face:

1 Like