Skip to content

Commit 7a99ae1

Browse files
authored
Remove distribution settings scriptable object (#473)
* Add missing meta files * Re-generate .meta files It was for safety as some were AI generated before. Only minor changes were made * Remove distribution settings and hardcode default localhost URL Removes the McpDistributionSettings system that allowed different defaults for Asset Store vs git distributions. Hardcodes the default HTTP base URL to "http://localhost:8080" directly in HttpEndpointUtility and WebSocketTransportClient. Removes the setup window skip logic for remote defaults. It didn't work in practice, best thing to do is replace the placeholder in the UXML
1 parent e35ef22 commit 7a99ae1

File tree

6 files changed

+2
-144
lines changed

6 files changed

+2
-144
lines changed

MCPForUnity/Editor/Config.meta

Lines changed: 0 additions & 8 deletions
This file was deleted.

MCPForUnity/Editor/Config/McpDistributionSettings.cs

Lines changed: 0 additions & 105 deletions
This file was deleted.

MCPForUnity/Editor/Config/McpDistributionSettings.cs.meta

Lines changed: 0 additions & 11 deletions
This file was deleted.

MCPForUnity/Editor/Helpers/HttpEndpointUtility.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using System;
2-
using MCPForUnity.Editor.Config;
32
using MCPForUnity.Editor.Constants;
43
using UnityEditor;
54

@@ -13,7 +12,7 @@ namespace MCPForUnity.Editor.Helpers
1312
public static class HttpEndpointUtility
1413
{
1514
private const string PrefKey = EditorPrefKeys.HttpBaseUrl;
16-
private static string DefaultBaseUrl => McpDistribution.Settings.defaultHttpBaseUrl;
15+
private const string DefaultBaseUrl = "http://localhost:8080";
1716

1817
/// <summary>
1918
/// Returns the normalized base URL currently stored in EditorPrefs.

MCPForUnity/Editor/Services/Transport/Transports/WebSocketTransportClient.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
using System.Text;
77
using System.Threading;
88
using System.Threading.Tasks;
9-
using MCPForUnity.Editor.Config;
109
using MCPForUnity.Editor.Helpers;
1110
using MCPForUnity.Editor.Services;
1211
using MCPForUnity.Editor.Services.Transport;
@@ -706,7 +705,7 @@ private static Uri BuildWebSocketUri(string baseUrl)
706705
{
707706
if (string.IsNullOrWhiteSpace(baseUrl))
708707
{
709-
baseUrl = McpDistribution.Settings.defaultHttpBaseUrl;
708+
baseUrl = "http://localhost:8080";
710709
}
711710

712711
if (!Uri.TryCreate(baseUrl, UriKind.Absolute, out var httpUri))

MCPForUnity/Editor/Setup/SetupWindowService.cs

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using System;
2-
using MCPForUnity.Editor.Config;
32
using MCPForUnity.Editor.Constants;
43
using MCPForUnity.Editor.Dependencies;
54
using MCPForUnity.Editor.Dependencies.Models;
@@ -51,21 +50,6 @@ private static void CheckSetupNeeded()
5150
// Check if setup was already completed or dismissed in previous sessions
5251
bool setupCompleted = EditorPrefs.GetBool(SETUP_COMPLETED_KEY, false);
5352
bool setupDismissed = EditorPrefs.GetBool(SETUP_DISMISSED_KEY, false);
54-
bool userOverrodeHttpUrl = EditorPrefs.HasKey(EditorPrefKeys.HttpBaseUrl);
55-
56-
// In Asset Store builds with a remote default URL (and no user override), skip the local setup wizard.
57-
if (
58-
!userOverrodeHttpUrl
59-
&& McpDistribution.Settings.skipSetupWindowWhenRemoteDefault
60-
&& McpDistribution.Settings.IsRemoteDefault
61-
)
62-
{
63-
McpLog.Info(
64-
"Skipping Setup Window because this distribution ships with a hosted MCP URL. Open Window/MCP For Unity/Setup Window if you want to configure a local runtime.",
65-
always: false
66-
);
67-
return;
68-
}
6953

7054
// Only show Setup Window if it hasn't been completed or dismissed before
7155
if (!(setupCompleted || setupDismissed))

0 commit comments

Comments
 (0)