fix(setup): reuse stored project port in StartAutoConnect to avoid port changes during client setup
parent
f4bc7cd4fd
commit
10903a2d48
|
|
@ -45,8 +45,8 @@ namespace UnityMcpBridge.Editor
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
// Discover new port and save it
|
// Reuse stored project port when available to avoid port changes during setup
|
||||||
currentUnityPort = PortManager.DiscoverNewPort();
|
currentUnityPort = PortManager.GetPortWithFallback();
|
||||||
|
|
||||||
listener = new TcpListener(IPAddress.Loopback, currentUnityPort);
|
listener = new TcpListener(IPAddress.Loopback, currentUnityPort);
|
||||||
listener.Start();
|
listener.Start();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue