fix(setup): reuse stored project port in StartAutoConnect to avoid port changes during client setup

main
David Sarno 2025-08-08 10:35:00 -07:00
parent f4bc7cd4fd
commit 10903a2d48
1 changed files with 2 additions and 2 deletions

View File

@ -45,8 +45,8 @@ namespace UnityMcpBridge.Editor
try
{
// Discover new port and save it
currentUnityPort = PortManager.DiscoverNewPort();
// Reuse stored project port when available to avoid port changes during setup
currentUnityPort = PortManager.GetPortWithFallback();
listener = new TcpListener(IPAddress.Loopback, currentUnityPort);
listener.Start();