public override void OnInspectorGUI()
        {
            base.OnInspectorGUI();

            if (Application.isPlaying)
            {
                if (GUILayout.Button("AI Debugger"))
                {
                    GoapAIDebuggerWindow.OpenWindow(self.agent);
                }

                if (GUILayout.Button("Reload Scenario"))
                {
                    (target as AIScenarioAgentComponent).Load();
                }

                if (self.agent != null)
                {
                    GUILayout.Space(10f);
                    GUILayout.Label($"当前计划: {(self.agent.hasActionPlan () ? self.agent.actions?.Peek ()?.name : string.Empty)}");
                    GUILayout.Space(10f);
                    GUILayout.Label($"当前目标: {(self.agent.GetGoal () != null ? self.agent.GetGoal ().name : string.Empty)}");
                    GUILayout.Space(10f);
                    GUILayout.Label($"条件: ");
                    foreach (var condition in self.agent.GetConditions())
                    {
                        GUILayout.Label($"  {condition.Key} = {condition.Value?.OnCheck ()}");
                    }
                    GUILayout.Space(10f);
                }
            }
        }
        private static void ShowWindow()
        {
            GoapAIDebuggerWindow window =
                ( GoapAIDebuggerWindow )EditorWindow.GetWindow(typeof(GoapAIDebuggerWindow), false,
                                                               "AI Debugger");

            window.autoRepaintOnSceneChange = true;
        }
        public static void OpenWindow(AIScenarioAgent agent)
        {
            GoapAIDebuggerWindow window =
                ( GoapAIDebuggerWindow )EditorWindow.GetWindow(typeof(GoapAIDebuggerWindow), false,
                                                               "AI Debugger");

            window.autoRepaintOnSceneChange = true;
            window.SetupAgent(agent);
        }