Files
Marcus Sanatan c770a8c713 Add EditorPrefs management window for MCP configuration debugging (#491)
* 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.

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-12-29 13:30:45 -04:00

31 lines
1.6 KiB
Plaintext

<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" editor-extension-mode="True">
<Style src="../Components/Common.uss" />
<Style src="EditorPrefsWindow.uss" />
<ui:ScrollView name="scroll-view" mode="Vertical">
<!-- Header -->
<ui:VisualElement class="header">
<ui:Label text="EditorPrefs Manager" class="title" />
<ui:Label text="Manage MCP for Unity EditorPrefs. Useful for development and testing." class="description" />
</ui:VisualElement>
<!-- Add New Row (initially hidden) -->
<ui:VisualElement name="add-new-row" class="add-new-row" style="display: none;">
<ui:VisualElement class="add-row-content">
<ui:TextField name="new-key-field" label="Key" class="key-field" />
<ui:TextField name="new-value-field" label="Value" class="value-field" />
<ui:DropdownField name="new-type-dropdown" label="Type" class="type-dropdown" choices="String,Int,Float,Bool" index="0" />
<ui:VisualElement class="add-buttons">
<ui:Button name="create-button" text="Create" class="save-button" />
<ui:Button name="cancel-button" text="Cancel" class="cancel-button" />
</ui:VisualElement>
</ui:VisualElement>
</ui:VisualElement>
<!-- Prefs List -->
<ui:VisualElement name="prefs-container" class="prefs-container">
<!-- Items will be added here programmatically -->
</ui:VisualElement>
</ui:ScrollView>
</ui:UXML>