UnityEngine.Networking.NetworkManager.OnValidate C# (CSharp) Method

OnValidate() private method

private OnValidate ( ) : void
return void
        private void OnValidate()
        {
            if (this.m_SimulatedLatency < 1)
            {
                this.m_SimulatedLatency = 1;
            }
            if (this.m_SimulatedLatency > 500)
            {
                this.m_SimulatedLatency = 500;
            }
            if (this.m_PacketLossPercentage < 0f)
            {
                this.m_PacketLossPercentage = 0f;
            }
            if (this.m_PacketLossPercentage > 99f)
            {
                this.m_PacketLossPercentage = 99f;
            }
            if (this.m_MaxConnections <= 0)
            {
                this.m_MaxConnections = 1;
            }
            if (this.m_MaxConnections > 0x7d00)
            {
                this.m_MaxConnections = 0x7d00;
            }
            if (this.m_MaxBufferedPackets <= 0)
            {
                this.m_MaxBufferedPackets = 0;
            }
            if (this.m_MaxBufferedPackets > 0x200)
            {
                this.m_MaxBufferedPackets = 0x200;
                if (LogFilter.logError)
                {
                    Debug.LogError("NetworkManager - MaxBufferedPackets cannot be more than " + 0x200);
                }
            }
            if ((this.m_PlayerPrefab != null) && (this.m_PlayerPrefab.GetComponent<NetworkIdentity>() == null))
            {
                if (LogFilter.logError)
                {
                    Debug.LogError("NetworkManager - playerPrefab must have a NetworkIdentity.");
                }
                this.m_PlayerPrefab = null;
            }
            if (this.m_ConnectionConfig.MinUpdateTimeout <= 0)
            {
                if (LogFilter.logError)
                {
                    Debug.LogError("NetworkManager MinUpdateTimeout cannot be zero or less. The value will be reset to 1 millisecond");
                }
                this.m_ConnectionConfig.MinUpdateTimeout = 1;
            }
            if ((this.m_GlobalConfig != null) && (this.m_GlobalConfig.ThreadAwakeTimeout <= 0))
            {
                if (LogFilter.logError)
                {
                    Debug.LogError("NetworkManager ThreadAwakeTimeout cannot be zero or less. The value will be reset to 1 millisecond");
                }
                this.m_GlobalConfig.ThreadAwakeTimeout = 1;
            }
        }