unity-mcp/MCPForUnity/Editor/MenuItems/MCPForUnityMenu.cs

37 lines
966 B
C#

using MCPForUnity.Editor.Setup;
using MCPForUnity.Editor.Windows;
using UnityEditor;
using UnityEngine;
namespace MCPForUnity.Editor.MenuItems
{
public static class MCPForUnityMenu
{
[MenuItem("Window/MCP For Unity/Toggle MCP Window %#m", priority = 1)]
public static void ToggleMCPWindow()
{
if (MCPForUnityEditorWindow.HasAnyOpenWindow())
{
MCPForUnityEditorWindow.CloseAllOpenWindows();
}
else
{
MCPForUnityEditorWindow.ShowWindow();
}
}
[MenuItem("Window/MCP For Unity/Setup Window", priority = 2)]
public static void ShowSetupWindow()
{
SetupWindowService.ShowSetupWindow();
}
[MenuItem("Window/MCP For Unity/EditorPrefs", priority = 3)]
public static void ShowEditorPrefsWindow()
{
EditorPrefsWindow.ShowWindow();
}
}
}