Function PointGraph.RebuildNodeLookup
Rebuilds the lookup structure for nodes.
void RebuildNodeLookup ()
Rebuilds the lookup structure for nodes.
This is used when optimizeForSparseGraph is enabled.
You should call this method every time you move a node in the graph manually and you are using optimizeForSparseGraph, otherwise pathfinding might not work correctly.
You may also call this after you have added many nodes using the AddNode method. When adding nodes using the AddNode method they will be added to the lookup structure. The lookup structure will rebalance itself when it gets too unbalanced however if you are sure you won't be adding any more nodes in the short term, you can make sure it is perfectly balanced and thus squeeze out the last bit of performance by calling this method. This can improve the performance of the GetNearest method slightly. The improvements are on the order of 10-20%.