Function PointGraph.RegisterConnectionLength

RegisterConnectionLength (long sqrLength)

Ensures the graph knows that there is a connection with this length.

Public
void RegisterConnectionLength (

long

sqrLength

The length of the connection in squared Int3 units. This can be calculated using (node1.position - node2.position).sqrMagnitudeLong.

)

Ensures the graph knows that there is a connection with this length.

This is used when the nearest node distance mode is set to ToConnection. If you are modifying node connections yourself (i.e. manipulating the PointNode.connections array) then you must call this function when you add any connections.

When using GraphNode.Connect this is done automatically. It is also done for all nodes when RebuildNodeLookup is called.