Seek path over multiple gridgraph's

Hi

Okay. This is possible, however linking adjacent grid graphs is not something that is supported out of the box.

If you keep your own internal list of grid graphs you should be able to link the proper nodes together using some code. Something like:

void AddGridGraph(int chunkX, int chunkZ) {
    ...
    // z = 0
    for (int x = 0; x < graph.width; x++) {
         var node = graph.GetNode(x, 0);
         var adjacentGraph = GetGraphAtChunk(chunkX, chunkZ-1);
         var adjacentNode = adjacentGraph.GetNode(x, adjacentGraph.depth - 1);
         var cost = (adjacentNode.position - node.position).CostMagnitude;
         node.AddConnection(adjacentNode, cost);
         adjacentNode.AddConnection(node, cost);
    }
    // Similar code for the 4 other edges of the graph
}

Another approach you could use which might be easier is to use overlapping grid graphs.
image
So you never actually connect different graphs, but you make sure that a given unit uses the graph which has its center closest to it. Since the graphs are overlapping this will ensure that the unit has at least 25% of the grid’s width of pathable space in any given direction (depending on how much larger than necessary you make the grids).
Also take a look at this tutorial for some info that might be useful: https://arongranberg.com/astar/docs/multipleagenttypes.html