Function GraphNode.Destroy

Destroy ()

Destroys the node.

Public
void Destroy ()

Destroys the node.

Cleans up any temporary pathfinding data used for this node. The graph is responsible for calling this method on nodes when they are destroyed, including when the whole graph is destoyed. Otherwise memory leaks might present themselves.

Once called the Destroyed property will return true and subsequent calls to this method will not do anything.

Note

Assumes the current active AstarPath instance is the same one that created this node.

Warning

Should only be called by graph classes on their own nodes