public GraphNode (AstarPath astar) { //this.nodeIndex = NextNodeIndex++; if (astar != null) { this.nodeIndex = astar.GetNewNodeIndex(); astar.InitializeNode (this); } else { throw new System.Exception ("No active AstarPath object to bind to"); } }