fix(bridge): prefer persisted project port at start to avoid initial 6400 blip after UPM import
parent
5c632f0ab3
commit
57592017ae
|
|
@ -141,12 +141,11 @@ namespace UnityMcpBridge.Editor
|
|||
|
||||
Stop();
|
||||
|
||||
// Attempt fast bind with same-port preference
|
||||
// Attempt fast bind with stored-port preference (sticky per-project)
|
||||
try
|
||||
{
|
||||
currentUnityPort = currentUnityPort > 0 && PortManager.IsPortAvailable(currentUnityPort)
|
||||
? currentUnityPort
|
||||
: PortManager.GetPortWithFallback();
|
||||
// Always consult PortManager first so we prefer the persisted project port
|
||||
currentUnityPort = PortManager.GetPortWithFallback();
|
||||
|
||||
const int maxImmediateRetries = 3;
|
||||
const int retrySleepMs = 75;
|
||||
|
|
|
|||
Loading…
Reference in New Issue