Skip to content

Commit 2bc51a2

Browse files
committed
feat: add setup wizard persistence to avoid showing on subsequent imports
1 parent aef3d61 commit 2bc51a2

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

UnityMcpBridge/Editor/Setup/SetupWizard.cs

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,26 @@ private static void CheckSetupNeeded()
4040

4141
try
4242
{
43-
// Always show setup wizard on package import
44-
McpLog.Info("Package imported - showing setup wizard", always: false);
43+
// Check if setup was already completed or dismissed in previous sessions
44+
bool setupCompleted = EditorPrefs.GetBool(SETUP_COMPLETED_KEY, false);
45+
bool setupDismissed = EditorPrefs.GetBool(SETUP_DISMISSED_KEY, false);
4546

46-
var dependencyResult = DependencyManager.CheckAllDependencies();
47-
EditorApplication.delayCall += () => ShowSetupWizard(dependencyResult);
47+
// Only show setup wizard if it hasn't been completed or dismissed before
48+
if (!(setupCompleted || setupDismissed))
49+
{
50+
McpLog.Info("Package imported - showing setup wizard", always: false);
51+
52+
var dependencyResult = DependencyManager.CheckAllDependencies();
53+
EditorApplication.delayCall += () => ShowSetupWizard(dependencyResult);
54+
}
55+
else
56+
{
57+
McpLog.Info("Setup wizard skipped - previously completed or dismissed", always: false);
58+
}
4859
}
4960
catch (Exception ex)
5061
{
51-
McpLog.Error($"Error showing setup wizard: {ex.Message}");
62+
McpLog.Error($"Error checking setup status: {ex.Message}");
5263
}
5364
}
5465

0 commit comments

Comments
 (0)