I’m working on an RTS kind of game for about 2 years now. From the start I was using Unity and A* Pathfinding.
After making an update of the library, some functions are lost and I can find replacement for them.
First of all after loading my scene I was doing some Walkability changes to some nodes
GridGraph gridGraph=AstarPath.active.astarData.gridGraph;
Node node=gridGraph.nodes[Width*z+x];
node.walkable=walkability;
node.UpdateConnections();
after all the changes I was calling
AstarPath.active.FloodFill();
And everything was working. When I was turning on show graph in unity, graph was properly changed.
With new version I’m missing GridNode.UpdateConnections();
And after calling FloodFill it shows properly what nodes are not walkable but there are still connections to this nodes shown, and also cut corners is not applied. (agents can cut corners).
Also there is a question if GridNode.ContainsConnection returns true if one of checked nodes is not walkable ?
I don’t want to run GraphUpdateObject because I need only update connections (with cut corners) and manually walkability.
Second question is with GraphUpdateScene and DataUpdate.
Since I was in need to call it’s Apply function manually and get data from newly updated graph asap.
I was calling GraphUpdateScene.Apply on all collected GraphUpdateScene
AstarPath.active.FlushGraphUpdates();
AstarPath.active.DataUpdate()
Now I’m missing DataUpdate function, is there some kind of replacement ?