How to improve creation time of recast graph

Which factors affect the most and what are the drawbacks?
Level size? Amount of meshes? Quality of the graph?
I’ve got a big level and it’s taking up to 10 seconds currently, and I would like to do it runtime.
Is it possbile to asynchronously while game is running?

Hi

The primary factors are:

  1. Cell size and world size (more directly the size of the recast graph in voxels).
  2. If you are using tiling, using tiling means the scanning process can be more effectively parallelized.
  3. The complexity of the meshes, this is not as big of a factor, but rasterizing colliders instead of meshes can improve performance since they are usually less complex.

You can scan the graph asynchronously using AstarPath.active.ScanAsync.

1 Like