void
Scan
(
NavGraph[] | graphsToScan=null | The graphs to scan. If this parameter is null then all graphs will be scanned |
)
Scans all specified graphs.
Calling this method will recalculate all specified graphs (or all graphs if the graphsToScan parameter is null) from scratch. This method is pretty slow (depending on graph type and graph complexity of course), so it is advisable to use smaller graph updates whenever possible.
// Recalculate all graphs
AstarPath.active.Scan();
// Recalculate only the first grid graph
var graphToScan = AstarPath.active.data.gridGraph;
AstarPath.active.Scan(graphToScan);
// Recalculate only the first and third graphs
var graphsToScan = new [] { AstarPath.active.data.graphs[0], AstarPath.active.data.graphs[2] };
AstarPath.active.Scan(graphsToScan);