Function GridGraph.RecalculateConnectionsInRegion

RecalculateConnectionsInRegion (IntRect recalculateRect)

Recalculates node connections for all nodes in a given region of the grid.

Public
void RecalculateConnectionsInRegion (

IntRect

recalculateRect

)

Recalculates node connections for all nodes in a given region of the grid.

This is used if you have manually changed the walkability, or other parameters, of some grid nodes, and you need their connections to be recalculated. If you are changing the connections themselves, you should use the GraphNode.AddConnection and GraphNode.RemoveConnection functions instead.

Typically you do not change walkability manually. Instead you can use for example a GraphUpdateObject.

Warning

This method has some constant overhead, so if you are making several changes to the graph, it is best to batch these updates and only make a single call to this method.

Note

This will not take into account any grid graph rules that modify connections. So if you have any of those added to the grid graph, you probably want to do a regular graph update instead.