public void DoStuff() { var a = g.CreateNodes(number.Value); nodes.Value = new FsmNodes(); (nodes.Value as FsmNodes).Value = (List <Node>)FsmConverter.NodeListToArray(a); // g.nodes += a; // AstarPath.active.NodeCountChanged() ; AstarPathExtensions.ScanGraph(g); }