Esempio n. 1
0
        private void InitializeView()
        {
            if (Instance != null)
            {
                workView             = new ASMWorkView();
                propertiesView       = new ASMPropertiesView();
                stateModifyView      = new ASMStateModifyView();
                transitionModifyView = new ASMTransitionModifyView();
            }
            else
            {
                Instance = GetWindow <AdvancedStateMachineEditorWindow>();
                Instance.titleContent = new GUIContent("AdvancedStateMachine");
                Instance.Show();

                workView             = new ASMWorkView();
                propertiesView       = new ASMPropertiesView();
                stateModifyView      = new ASMStateModifyView();
                transitionModifyView = new ASMTransitionModifyView();
            }

            workView.Initialize();
            propertiesView.Initialize();

            isModifyViewOpen = false;
        }
Esempio n. 2
0
        public static void OpenWindow(AdvancedStateMachine data)
        {
            Instance = GetWindow <AdvancedStateMachineEditorWindow>();
            Instance.titleContent = new GUIContent("AdvancedStateMachine");

            if (data != null)
            {
                Instance.InitializeView();

                Instance.selected = data;
                Instance.InitializePropertyData();
                {
                    Instance.InitializeNode();
                    Instance.InitializeConnection();
                    Instance.InitializeStateNames();
                }
                Instance.InitializePropertyData();

                Instance.LoadData();
            }
            else
            {
                Debug.LogError("[Editor]]Not Found Advanced State Machine");
            }

            Instance.Show();
        }