Skip to content

Commit 7db81f1

Browse files
committed
fix: move initialization flag after tool discovery to prevent race conditions
1 parent 1d5291e commit 7db81f1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

UnityMcpBridge/Editor/Tools/CommandRegistry.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ public static class CommandRegistry
2222
public static void Initialize()
2323
{
2424
if (_initialized) return;
25-
_initialized = true;
2625

2726
AutoDiscoverTools();
27+
_initialized = true;
2828
}
2929

3030
/// <summary>

0 commit comments

Comments
 (0)