How to expand grid graph in dynamic 2D world?

I’m currently making 2D procedurally generated world. I know how to generate initial grid, but I think I need to expand it when player moves and triggers new “chunk” generation. I looked at 3D example, but I think I don’t need a moving graph, I just need to expand it. How to do this?

Hi

For a grid graph, there’s currently no way to expand an already existing one without re-scanning the graph from scratch.

But you want to do that, you can do it using:

var graph = AstarPath.active.data.gridGraph;
graph.SetDimensions(...);
graph.center = ...;
graph.Scan();

For recast graphs, in the beta version, there’s this method: RecastGraph - A* Pathfinding Project