Function Path.OpenCandidateConnectionsToEndNode

OpenCandidateConnectionsToEndNode (Int3 position, uint parentPathNode, uint parentNodeIndex, uint parentG)

Open a connection to the temporary end node if necessary.

Public
void OpenCandidateConnectionsToEndNode (

Int3

position

Position of the path node that is being opened. This may be different from the node's position if PathNode.fractionAlongEdge is being used.

uint

parentPathNode

Index of the path node that is being opened. This is often the same as parentNodeIndex, but may be different if the node has multiple path node variants.

uint

parentNodeIndex

Index of the node that is being opened.

uint

parentG

G score of the parent node. The cost to reach the parent node from the start of the path.

)

Open a connection to the temporary end node if necessary.

The start and end nodes are temporary nodes and are not included in the graph itself. This means that we need to handle connections to and from those nodes as a special case. This function will open a connection from the given node to the end node, if such a connection exists.

It is called from the GraphNode.Open function.