示例#1
0
        private static void ShowWindow()
        {
            GoapAIScenarioWindow window =
                ( GoapAIScenarioWindow )EditorWindow.GetWindow(typeof(GoapAIScenarioWindow), false, "Goap AI编辑器");

            window.autoRepaintOnSceneChange = true;
        }
示例#2
0
        void OnDisable()
        {
            current = null;

            EditorPrefs.SetBool("GoapAIScenarioWindow.isEditorLocked", isEditorLocked);
            EditorPrefs.SetFloat("GoapAIScenarioWindow.zoomFactor", zoomFactor);

            EditorApplication.playModeStateChanged -= PlayModeChange;
            Selection.selectionChanged             -= OnSelectionChange;
        }
示例#3
0
        void OnEnable()
        {
            current      = this;
            titleContent = new GUIContent("Goap", EditorGUIUtility.FindTexture("tree_icon_leaf"));

            willRepaint    = true;
            fullDrawPass   = true;
            wantsMouseMove = true;
            minSize        = new Vector2(700, 300);

            isEditorLocked = EditorPrefs.GetBool("GoapAIScenarioWindow.isEditorLocked", isEditorLocked);
            zoomFactor     = EditorPrefs.GetFloat("GoapAIScenarioWindow.zoomFactor", zoomFactor);

            EditorApplication.playModeStateChanged -= PlayModeChange;
            EditorApplication.playModeStateChanged += PlayModeChange;

            Selection.selectionChanged -= OnSelectionChange;
            Selection.selectionChanged += OnSelectionChange;
        }