mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
InternalReplacePlayerForConnection: call GetComponent directly.
This commit is contained in:
parent
7d439f0c20
commit
892d894d0f
@ -615,8 +615,8 @@ static void FinishPlayerForConnection(NetworkConnection conn, NetworkIdentity id
|
||||
|
||||
internal static bool InternalReplacePlayerForConnection(NetworkConnection conn, GameObject playerGameObject)
|
||||
{
|
||||
NetworkIdentity playerNetworkIdentity;
|
||||
if (!GetNetworkIdentity(playerGameObject, out playerNetworkIdentity))
|
||||
NetworkIdentity playerNetworkIdentity = playerGameObject.GetComponent<NetworkIdentity>();
|
||||
if (playerNetworkIdentity == null)
|
||||
{
|
||||
Debug.LogError("ReplacePlayer: playerGameObject has no NetworkIdentity. Please add a NetworkIdentity to " + playerGameObject);
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user