From a5e3293e98a5fda805b6a490c47b6489d6bf52a6 Mon Sep 17 00:00:00 2001 From: Ivan Murzak Date: Wed, 18 Mar 2026 01:32:21 -0700 Subject: [PATCH 1/8] Hardcode Cloud server URL and remove UI input Remove editable Cloud server URL and make the plugin use a single hardcoded cloud URL. Added CloudServerBaseUrl/CloudServerUrl constants to UnityMcpPlugin.Config and changed Host to use the constant (no extra /mcp suffix). Removed the cloud URL TextField and its focus/connection callbacks from the editor UI and adjusted authorisation flow to use UnityConnectionConfig.CloudServerBaseUrl. Updated UnityMcpPluginEditor.Static to expose the cloud URL via the runtime config. CLI changes: dropped cloudServerUrl from the config shape, added a CLOUD_SERVER_URL constant and make resolveConnectionFromConfig return that value for Cloud mode. Updated tests and run-tool behavior to reflect the hardcoded cloud URL and removed references to a configurable cloudServerUrl. --- .../UI/Window/MainWindowEditor.Connection.cs | 33 ++----------------- .../Scripts/UnityMcpPluginEditor.Static.cs | 10 +----- .../root/Editor/UI/uxml/MainWindow.uxml | 1 - .../root/Runtime/UnityMcpPlugin.Config.cs | 9 ++--- cli/src/commands/run-tool.ts | 2 +- cli/src/utils/config.ts | 13 +++----- cli/tests/config.test.ts | 1 - cli/tests/run-tool.test.ts | 24 +++++--------- 8 files changed, 22 insertions(+), 71 deletions(-) diff --git a/Unity-MCP-Plugin/Assets/root/Editor/Scripts/UI/Window/MainWindowEditor.Connection.cs b/Unity-MCP-Plugin/Assets/root/Editor/Scripts/UI/Window/MainWindowEditor.Connection.cs index 725ef24a8..ad0f235a6 100644 --- a/Unity-MCP-Plugin/Assets/root/Editor/Scripts/UI/Window/MainWindowEditor.Connection.cs +++ b/Unity-MCP-Plugin/Assets/root/Editor/Scripts/UI/Window/MainWindowEditor.Connection.cs @@ -176,12 +176,11 @@ internal static bool IsAuthFlowRunning(DeviceAuthFlowState state) => private void SetupCloudAuthSection(VisualElement root) { - var inputCloudUrl = root.Q("inputCloudServerUrl"); var inputCloudToken = root.Q("inputCloudToken"); var btnRevoke = root.Q