diff --git a/Assets/Mirror/Runtime/NetworkClient.cs b/Assets/Mirror/Runtime/NetworkClient.cs index 09a947624..993488ff0 100644 --- a/Assets/Mirror/Runtime/NetworkClient.cs +++ b/Assets/Mirror/Runtime/NetworkClient.cs @@ -82,6 +82,12 @@ public static void Connect(string ip) // connect host mode internal static void ConnectLocalServer() { + if (LogFilter.Debug) Debug.Log("Client Connect Local Server"); + active = true; + RegisterSystemHandlers(true); + + connectState = ConnectState.Connected; + // create local connection to server connection = new ULocalConnectionToServer(); SetHandlers(connection); @@ -90,11 +96,6 @@ internal static void ConnectLocalServer() ULocalConnectionToClient connectionToClient = new ULocalConnectionToClient(); NetworkServer.SetLocalConnection(connectionToClient); - connectState = ConnectState.Connected; - - active = true; - RegisterSystemHandlers(true); - localClientPacketQueue.Enqueue(MessagePacker.Pack(new ConnectMessage())); }