Skip to content

Commit f465156

Browse files
author
Claude
committed
refactor: improve Asset Store compliance implementation with production-ready setup
- Remove automatic installation attempts on package import - Always show setup wizard on package install/reinstall - Integrate MCP client configuration as part of setup wizard process - Ensure MCP client config window remains accessible via menu - Remove testing components for production readiness - Replace automatic installation with manual guidance only - Add complete 4-step setup flow: Welcome → Dependencies → Installation Guide → Client Configuration → Complete - Improve user experience with clear instructions and accessible client management
1 parent b6c1d49 commit f465156

File tree

12 files changed

+317
-242
lines changed

12 files changed

+317
-242
lines changed

UnityMcpBridge/Editor/Dependencies.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

UnityMcpBridge/Editor/Dependencies/DependencyManagerTests.cs

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

UnityMcpBridge/Editor/Dependencies/DependencyManagerTests.cs.meta

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

UnityMcpBridge/Editor/Dependencies/Validators.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

UnityMcpBridge/Editor/Installation.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

UnityMcpBridge/Editor/Installation/Downloaders.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

UnityMcpBridge/Editor/Installation/Installers.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

UnityMcpBridge/Editor/Setup.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

UnityMcpBridge/Editor/Setup/SetupWizard.cs

Lines changed: 16 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -103,32 +103,14 @@ private static void CheckSetupNeeded()
103103
{
104104
var setupState = GetSetupState();
105105

106-
// Don't show setup if user has dismissed it or if already completed for this version
107-
if (!setupState.ShouldShowSetup(PACKAGE_VERSION))
108-
{
109-
McpLog.Info("Setup wizard not needed - already completed or dismissed", always: false);
110-
return;
111-
}
112-
113-
// Check if dependencies are missing
106+
// Always show setup wizard on package import/reinstall - ignore previous completion
107+
McpLog.Info("Package imported - showing setup wizard", always: false);
108+
109+
// Get current dependency status for the wizard
114110
var dependencyResult = DependencyManager.CheckAllDependencies();
115-
if (dependencyResult.IsSystemReady)
116-
{
117-
McpLog.Info("All dependencies available - marking setup as completed", always: false);
118-
setupState.MarkSetupCompleted(PACKAGE_VERSION);
119-
SaveSetupState();
120-
return;
121-
}
122-
123-
// Show setup wizard if dependencies are missing
124-
var missingRequired = dependencyResult.GetMissingRequired();
125-
if (missingRequired.Count > 0)
126-
{
127-
McpLog.Info($"Missing required dependencies: {string.Join(", ", missingRequired.ConvertAll(d => d.Name))}");
128-
129-
// Delay showing the wizard slightly to ensure Unity is fully loaded
130-
EditorApplication.delayCall += () => ShowSetupWizard(dependencyResult);
131-
}
111+
112+
// Delay showing the wizard slightly to ensure Unity is fully loaded
113+
EditorApplication.delayCall += () => ShowSetupWizard(dependencyResult);
132114
}
133115
catch (Exception ex)
134116
{
@@ -229,27 +211,13 @@ public static void ShowSetupWizardManual()
229211
ShowSetupWizard();
230212
}
231213

232-
/// <summary>
233-
/// Reset setup and show wizard again
234-
/// </summary>
235-
[MenuItem("Window/MCP for Unity/Reset Setup", priority = 2)]
236-
public static void ResetAndShowSetup()
237-
{
238-
ResetSetupState();
239-
_hasCheckedThisSession = false;
240-
ShowSetupWizard();
241-
}
242-
243214
/// <summary>
244215
/// Check dependencies and show status
245216
/// </summary>
246217
[MenuItem("Window/MCP for Unity/Check Dependencies", priority = 3)]
247218
public static void CheckDependencies()
248219
{
249220
var result = DependencyManager.CheckAllDependencies();
250-
var diagnostics = DependencyManager.GetDependencyDiagnostics();
251-
252-
Debug.Log($"<b><color=#2EA3FF>MCP-FOR-UNITY</color></b>: Dependency Check Results\n{diagnostics}");
253221

254222
if (!result.IsSystemReady)
255223
{
@@ -274,5 +242,14 @@ public static void CheckDependencies()
274242
);
275243
}
276244
}
245+
246+
/// <summary>
247+
/// Open MCP Client Configuration window
248+
/// </summary>
249+
[MenuItem("Window/MCP for Unity/MCP Client Configuration", priority = 4)]
250+
public static void OpenClientConfiguration()
251+
{
252+
Windows.MCPForUnityEditorWindow.ShowWindow();
253+
}
277254
}
278255
}

0 commit comments

Comments
 (0)