NetworkClient.InternalAddPlayer: improve error message

This commit is contained in:
vis2k 2022-12-10 02:47:09 +01:00
parent 6f98725247
commit 25794f2411
2 changed files with 2 additions and 2 deletions

View File

@ -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.");
}
/// <summary>Sends AddPlayer message to the server, indicating that we want to join the world.</summary>

View File

@ -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));