UnityEngine.Networking.NetworkMigrationManager.OnServerReconnectPlayerMessage C# (CSharp) Method

OnServerReconnectPlayerMessage() private method

private OnServerReconnectPlayerMessage ( NetworkMessage netMsg ) : void
netMsg NetworkMessage
return void
        private void OnServerReconnectPlayerMessage(NetworkMessage netMsg)
        {
            ReconnectMessage message = netMsg.ReadMessage<ReconnectMessage>();
            if (LogFilter.logDev)
            {
                Debug.Log(string.Concat(new object[] { "OnReconnectMessage: connId=", message.oldConnectionId, " playerControllerId:", message.playerControllerId, " netId:", message.netId }));
            }
            GameObject oldPlayer = this.FindPendingPlayer(message.oldConnectionId, message.netId, message.playerControllerId);
            if (oldPlayer == null)
            {
                if (LogFilter.logError)
                {
                    Debug.LogError(string.Concat(new object[] { "OnReconnectMessage connId=", message.oldConnectionId, " player null for netId:", message.netId, " msg.playerControllerId:", message.playerControllerId }));
                }
            }
            else if (oldPlayer.activeSelf)
            {
                if (LogFilter.logError)
                {
                    Debug.LogError("OnReconnectMessage connId=" + message.oldConnectionId + " player already active?");
                }
            }
            else
            {
                if (LogFilter.logDebug)
                {
                    Debug.Log("OnReconnectMessage: player=" + oldPlayer);
                }
                NetworkReader extraMessageReader = null;
                if (message.msgSize != 0)
                {
                    extraMessageReader = new NetworkReader(message.msgData);
                }
                if (message.playerControllerId != -1)
                {
                    if (extraMessageReader == null)
                    {
                        this.OnServerReconnectPlayer(netMsg.conn, oldPlayer, message.oldConnectionId, message.playerControllerId);
                    }
                    else
                    {
                        this.OnServerReconnectPlayer(netMsg.conn, oldPlayer, message.oldConnectionId, message.playerControllerId, extraMessageReader);
                    }
                }
                else
                {
                    this.OnServerReconnectObject(netMsg.conn, oldPlayer, message.oldConnectionId);
                }
            }
        }