public override void OnEnter()
        {
            var go = graphs.Value as FsmNavGraphs;
            if((go.Value == null) || !graph.UseVariable) {Finish(); return;} // it would continue for a frame without return

            var goo = FsmConverter.GetNavGraphs(graphs);
            var coo = new FsmNavGraph();

            if(index.Value>=goo.Length) //check if the index exists
            { Finish(); }

            coo.Value = goo[index.Value];
            graph.Value = coo;
            Finish();
        }
        public void DoStuff()
        {
            var doo = ((node as FsmObject).Value as FsmNode).Value as Node;

            nodeIndex.Value = doo.GetNodeIndex();
            penalty.Value = (int)doo.penalty;
            area.Value = doo.area;
            tags.Value = doo.tags;
            walkable.Value = doo.walkable;
            graphIndex.Value = doo.graphIndex;
            position.Value = new Vector3(doo.position.x,doo.position.y,doo.position.z);
            position.Value *= Int3.PrecisionFactor;

            if (!connectedNodes.IsNone)
            (connectedNodes.Value as FsmNodes).Value = (List<Node>)FsmConverter.NodeListToArray(doo.connections);

            var loo = new FsmNavGraph();
            loo.Value = AstarPath.active.graphs[doo.graphIndex];
            graph.Value = loo;
        }
 public FsmNavGraph SetNavGraph(NavGraph go)
 {
     FsmNavGraph doo = new FsmNavGraph();
     doo.Value = go;
     return doo;
 }
        public override void OnEnter()
        {
            mo = graph.Value as FsmNavGraph;
            if ((mo == null) ||(mo.Value == null) || alwaysNew.Value)
            {
                AstarPath.active.astarData.AddGraph(mo.Value);
                g = FsmConverter.GetNavGraph(graph) as PointGraph;
                Debug.Log ("Creating New Point Graph");

                graph.Value = FsmConverter.SetNavGraph(g as NavGraph);
            }
            else
            { g = FsmConverter.GetNavGraph(graph) as PointGraph;	}

            DoStuff();
            Finish();
        }