From 6f080f539073cfa716ca0ad8b99883dc6e743e0c Mon Sep 17 00:00:00 2001 From: Marcus Sanatan Date: Mon, 29 Dec 2025 13:40:50 -0400 Subject: [PATCH] Edit editor configs (#493) * Add EditorPrefs management window for MCP configuration debugging Meant to help with dev and testing, not so much the average user * Update MCPForUnity/Editor/Windows/EditorPrefs/EditorPrefsWindow.cs Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Revert "Update MCPForUnity/Editor/Windows/EditorPrefs/EditorPrefsWindow.cs" This reverts commit 09bb4e1d2582678bc87d0ace45f9d8c3c88c3203. * Reapply "Update MCPForUnity/Editor/Windows/EditorPrefs/EditorPrefsWindow.cs" This reverts commit 6ccbc5e478f0bd2b61c992ae60db0ca367d651ae. * Fix EditorPrefs type detection using sentinel values and null handling * Simplify EditorPrefs type detection using known type mapping and basic parsing Replace complex sentinel-based type detection with a dictionary of known pref types and simple TryParse fallback for unknown keys. Remove null handling and HasKey checks for known keys since they're defined in EditorPrefKeys. * Make the menu item more clear * Remove rounded borders and spacing from EditorPrefs list items Minor visual tweak [skip ci] --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- MCPForUnity/Editor/MenuItems/MCPForUnityMenu.cs | 2 +- .../Windows/EditorPrefs/EditorPrefsWindow.uss | 13 +++++-------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/MCPForUnity/Editor/MenuItems/MCPForUnityMenu.cs b/MCPForUnity/Editor/MenuItems/MCPForUnityMenu.cs index 38c8ea8..14a6e7b 100644 --- a/MCPForUnity/Editor/MenuItems/MCPForUnityMenu.cs +++ b/MCPForUnity/Editor/MenuItems/MCPForUnityMenu.cs @@ -27,7 +27,7 @@ namespace MCPForUnity.Editor.MenuItems } - [MenuItem("Window/MCP For Unity/EditorPrefs", priority = 3)] + [MenuItem("Window/MCP For Unity/Edit EditorPrefs", priority = 3)] public static void ShowEditorPrefsWindow() { EditorPrefsWindow.ShowWindow(); diff --git a/MCPForUnity/Editor/Windows/EditorPrefs/EditorPrefsWindow.uss b/MCPForUnity/Editor/Windows/EditorPrefs/EditorPrefsWindow.uss index b213220..30590d2 100644 --- a/MCPForUnity/Editor/Windows/EditorPrefs/EditorPrefsWindow.uss +++ b/MCPForUnity/Editor/Windows/EditorPrefs/EditorPrefsWindow.uss @@ -146,17 +146,14 @@ } .pref-item { - margin-bottom: 8px; + margin-bottom: 0; background-color: #393939; - border-left-width: 1px; - border-right-width: 1px; - border-top-width: 1px; + border-left-width: 0; + border-right-width: 0; + border-top-width: 0; border-bottom-width: 1px; - border-left-color: #555555; - border-right-color: #555555; - border-top-color: #555555; border-bottom-color: #555555; - border-radius: 4px; + border-radius: 0; padding: 8px; }