A* Pathfinding Project
3.1.4
The A* Pathfinding Project for Unity 3D
|
Contains useful functions for updating graphs. More...
Static Public Member Functions | |
static bool | IsPathPossible (Node n1, Node n2) |
Returns if there is a walkable path from n1 to n2. | |
static bool | IsPathPossible (List< Node > nodes) |
Returns if there are walkable paths between all nodes. | |
static bool | UpdateGraphsNoBlock (GraphUpdateObject guo, Node node1, Node node2, bool alwaysRevert=false) |
Updates graphs and checks if all nodes are still reachable from each other. | |
static bool | UpdateGraphsNoBlock (GraphUpdateObject guo, List< Node > nodes, bool alwaysRevert=false) |
Updates graphs and checks if all nodes are still reachable from each other. | |
Contains useful functions for updating graphs.
This class works a lot with the Node class, a useful function to get nodes is AstarPath.GetNearest.
Returns if there is a walkable path from n1 to n2.
If you are making changes to the graph, areas must first be recaculated using FloodFill()
|
static |
Returns if there are walkable paths between all nodes.
If you are making changes to the graph, areas must first be recaculated using FloodFill()
|
static |
Updates graphs and checks if all nodes are still reachable from each other.
Graphs are updated, then a check is made to see if the nodes are still reachable from each other. If they are not, the graphs are reverted to before the update and false is returned.
This is slower than a normal graph update. All queued graph updates and thread safe callbacks will be flushed during this function.
guo | The GraphUpdateObject to update the graphs with |
node1 | Node which should have a valid path to node2. All nodes should be walkable or false will be returned. |
node2 | Node which should have a valid path to node1. All nodes should be walkable or false will be returned. |
alwaysRevert | If true, reverts the graphs to the old state even if no blocking ocurred |
|
static |
Updates graphs and checks if all nodes are still reachable from each other.
Graphs are updated, then a check is made to see if the nodes are still reachable from each other. If they are not, the graphs are reverted to before the update and false is returned. This is slower than a normal graph update. All queued graph updates and thread safe callbacks will be flushed during this function.
guo | The GraphUpdateObject to update the graphs with |
nodes | Nodes which should have valid paths between them. All nodes should be walkable or false will be returned. |
alwaysRevert | If true, reverts the graphs to the old state even if no blocking ocurred |