void OnEnable()
        {
            ftmObject = (GameObject)Selection.activeObject;
            ftm       = ftmObject.GetComponent <FlyThroughManager>();
            ft        = ftm.flyThrough;

            if (ft.nodes == null)
            {
                ft.nodes = new List <BaseNode>();
            }
            if (ft.startEndNodes == null)
            {
                ft.startEndNodes = new List <StartEndNode>();
            }
            if (ft.pathNodes == null)
            {
                ft.pathNodes = new List <PathNode>();
            }

            nodeList      = ft.nodes;
            startEndNodes = ft.startEndNodes;
            pathNodes     = ft.pathNodes;

            DefineStyles();
        }
Exemplo n.º 2
0
 void OnEnable()
 {
     nodeList   = (FlyThroughManager)target;
     flyThrough = serializedObject.FindProperty("flyThrough");
     baseNodes  = serializedObject.FindProperty("baseNodes");
     //startEnd = serializedObject.FindProperty("startEndNodes");
     paths = serializedObject.FindProperty("pathNodes");
 }
        public StartEndNode(Rect rect, TypeOfNode typeOfNode, Action <BaseNode> OnClickRemoveNode, string title, string name, GUID id, FlyThroughManager ftm)
        {
            this.typeOfNode = typeOfNode;
            windowRect      = rect;
            OnRemoveNode    = OnClickRemoveNode;
            this.title      = title;
            this.name       = name;
            this.id         = id;
            this.ftm        = ftm;

            //CreateStartEndNode();
        }