We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5c632f0 commit 5759201Copy full SHA for 5759201
UnityMcpBridge/Editor/UnityMcpBridge.cs
@@ -141,12 +141,11 @@ public static void Start()
141
142
Stop();
143
144
- // Attempt fast bind with same-port preference
+ // Attempt fast bind with stored-port preference (sticky per-project)
145
try
146
{
147
- currentUnityPort = currentUnityPort > 0 && PortManager.IsPortAvailable(currentUnityPort)
148
- ? currentUnityPort
149
- : PortManager.GetPortWithFallback();
+ // Always consult PortManager first so we prefer the persisted project port
+ currentUnityPort = PortManager.GetPortWithFallback();
150
151
const int maxImmediateRetries = 3;
152
const int retrySleepMs = 75;
0 commit comments