-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Expand file tree
/
Copy pathMCPForUnityMenu.cs
More file actions
48 lines (44 loc) · 1.56 KB
/
Copy pathMCPForUnityMenu.cs
File metadata and controls
48 lines (44 loc) · 1.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
using MCPForUnity.Editor.Setup;
using MCPForUnity.Editor.Tools;
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/Local Setup Window", priority = 2)]
public static void ShowSetupWindow()
{
SetupWindowService.ShowSetupWindow();
}
[MenuItem("Window/MCP For Unity/Edit EditorPrefs", priority = 3)]
public static void ShowEditorPrefsWindow()
{
EditorPrefsWindow.ShowWindow();
}
/// <summary>
/// Emergency flush: cancels all queued/running MCP commands and clears stuck test jobs.
/// Use when the editor appears frozen due to a stuck MCP queue.
/// Shortcut: Ctrl+Shift+F5 (Cmd+Shift+F5 on Mac)
/// </summary>
[MenuItem("Window/MCP For Unity/Emergency Flush Queue %#&F5", priority = 100)]
public static void EmergencyFlushQueue()
{
CommandGatewayState.EmergencyFlush();
Debug.LogWarning("[MCP] Emergency flush completed. Queue cleared, stuck test jobs removed.");
}
}
}