diff --git a/Assets/Mirror/Core/NetworkClient.cs b/Assets/Mirror/Core/NetworkClient.cs index 17f76861b..6a8dbc174 100644 --- a/Assets/Mirror/Core/NetworkClient.cs +++ b/Assets/Mirror/Core/NetworkClient.cs @@ -991,7 +991,7 @@ internal static void InternalAddPlayer(NetworkIdentity identity) { connection.identity = identity; } - else Debug.LogWarning("No ready connection found for setting player controller during InternalAddPlayer"); + else Debug.LogWarning("NetworkClient can't AddPlayer before being ready. Please call NetworkClient.Ready() first. Clients are considered ready after joining the game world."); } /// Sends AddPlayer message to the server, indicating that we want to join the world. diff --git a/Assets/Mirror/Tests/Editor/ClientSceneTests_OnSpawn.cs b/Assets/Mirror/Tests/Editor/ClientSceneTests_OnSpawn.cs index 7c04c03a6..a5f70753d 100644 --- a/Assets/Mirror/Tests/Editor/ClientSceneTests_OnSpawn.cs +++ b/Assets/Mirror/Tests/Editor/ClientSceneTests_OnSpawn.cs @@ -566,7 +566,7 @@ public void ApplyPayload_LocalPlayerWarningWhenNoReadyConnection() }; - LogAssert.Expect(LogType.Warning, "No ready connection found for setting player controller during InternalAddPlayer"); + LogAssert.Expect(LogType.Warning, "NetworkClient can't AddPlayer before being ready. Please call NetworkClient.Ready() first. Clients are considered ready after joining the game world."); NetworkClient.ApplySpawnPayload(identity, msg); Assert.That(NetworkClient.localPlayer, Is.EqualTo(identity));