Get all nodes in graph (formally graph.nodes)

Hi,
how can I use the GetNodes function? It requires a delegate method, but the documentation does not say what that’s supposed to be. Does GraphNodeDelegateCancelable refer to an async exception? What should I do if it’s called?
Also, how do I get the actual array? The Delegate returns only 1 node at a time. Must I create the array myself? And if so, is there another way to do this? The delegate function overhead would be enormous on bigger graphs and my application needs the performance.
Thanks!

Hi

The GetNodes method is just a delegate taking one GraphNode and returning a bool for if to continue with more nodes or just abort the iteration.
See http://arongranberg.com/astar/docs/namespace_pathfinding.php#a0b744e358b4fb641d91783e6b6b2114f

So you can use it like
graph.GetNodes (delegate (GraphNode node) { Debug.Log ("We found a node"); return true; });

Note that graph.nodes exists for some specific graph types, e.g the GridGraph and the PointGraph has a nodes field. However the RecastGraph has a different structure (it stores the nodes in tiles, not in a single large array).

Thanks, I knew I was missing something!