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; }
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(); }