diff --git a/Assets/Mirror/Runtime/NetworkServer.cs b/Assets/Mirror/Runtime/NetworkServer.cs
index ce26dde6a..a520db0a5 100644
--- a/Assets/Mirror/Runtime/NetworkServer.cs
+++ b/Assets/Mirror/Runtime/NetworkServer.cs
@@ -596,26 +596,6 @@ public static bool AddPlayerForConnection(NetworkConnection conn, GameObject pla
return AddPlayerForConnection(conn, player);
}
- /// Replaces connection's player object. The old object is not destroyed.
- // This does NOT change the ready state of the connection, so it can
- // safely be used while changing scenes.
- public static bool ReplacePlayerForConnection(NetworkConnection conn, GameObject player, bool keepAuthority = false)
- {
- return InternalReplacePlayerForConnection(conn, player, keepAuthority);
- }
-
- /// Replaces connection's player object. The old object is not destroyed.
- // This does NOT change the ready state of the connection, so it can
- // safely be used while changing scenes.
- public static bool ReplacePlayerForConnection(NetworkConnection conn, GameObject player, Guid assetId, bool keepAuthority = false)
- {
- if (GetNetworkIdentity(player, out NetworkIdentity identity))
- {
- identity.assetId = assetId;
- }
- return InternalReplacePlayerForConnection(conn, player, keepAuthority);
- }
-
internal static bool InternalReplacePlayerForConnection(NetworkConnection conn, GameObject player, bool keepAuthority)
{
NetworkIdentity identity = player.GetComponent();
@@ -665,6 +645,26 @@ internal static bool InternalReplacePlayerForConnection(NetworkConnection conn,
return true;
}
+ /// Replaces connection's player object. The old object is not destroyed.
+ // This does NOT change the ready state of the connection, so it can
+ // safely be used while changing scenes.
+ public static bool ReplacePlayerForConnection(NetworkConnection conn, GameObject player, bool keepAuthority = false)
+ {
+ return InternalReplacePlayerForConnection(conn, player, keepAuthority);
+ }
+
+ /// Replaces connection's player object. The old object is not destroyed.
+ // This does NOT change the ready state of the connection, so it can
+ // safely be used while changing scenes.
+ public static bool ReplacePlayerForConnection(NetworkConnection conn, GameObject player, Guid assetId, bool keepAuthority = false)
+ {
+ if (GetNetworkIdentity(player, out NetworkIdentity identity))
+ {
+ identity.assetId = assetId;
+ }
+ return InternalReplacePlayerForConnection(conn, player, keepAuthority);
+ }
+
// ready ///////////////////////////////////////////////////////////////
/// Flags client connection as ready (=joined world).
// When a client has signaled that it is ready, this method tells the