- Home /
Astar Pathfinding not scanning graph
So here's what's happening: The game generates a main world, and then I call
AstarPath.active.UpdateGraphs(new Bounds(new Vector3(0, 0, 0), new Vector3(width * 16, height * 16, 1)));
to recalculate the Grid Graph and it works fine.
But then I generate a Cave and I need to recalcuate/Scan the graph. I've tried using the above command and
AstarPath.active.Scan();
it does nothing. Either it does absolutely nothing to the grid graph or I suddenly just can't see the graph at all (in the Scene view).
But if I click the "Scan" button on the Astar Path script in the editor it recalculates it perfectly. I can't figure this out.
Update: I think this has to do with me resizing the graph. If I call the first command WITHOUT resizing the graph it works. I still need to resize the graph though.
Is this related to the Astar Pathfinding Project? If yes, the question is better suited for the APP forums.
Your answer
![](https://koobas.hobune.stream/wayback/20220612084548im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
A* Pathfinding Project Problem with Obstacles 2 Answers
A* endless loop 0 Answers
A* pathfinding generating new path when created new obstacle 0 Answers
Multiple Cars not working 1 Answer