public SendUnreliable ( short msgType, |
||
msgType | short | The message ID to send. |
msg | The message to send. | |
return | bool |
public bool SendUnreliable(short msgType, MessageBase msg) { if (m_Connection != null) { if (m_AsyncConnect != ConnectState.Connected) { if (LogFilter.logError) { Debug.LogError("NetworkClient SendUnreliable when not connected to a server"); } return(false); } #if UNITY_EDITOR UnityEditor.NetworkDetailStats.IncrementStat( UnityEditor.NetworkDetailStats.NetworkDirection.Outgoing, MsgType.UserMessage, msgType.ToString() + ":" + msg.GetType().Name, 1); #endif return(m_Connection.SendUnreliable(msgType, msg)); } if (LogFilter.logError) { Debug.LogError("NetworkClient SendUnreliable with no connection"); } return(false); }
public bool SendUnreliable(short msgType, MessageBase msg) { if (m_Connection != null) { if (m_AsyncConnect != ConnectState.Connected) { if (LogFilter.logError) { Debug.LogError("NetworkClient SendUnreliable when not connected to a server"); } return(false); } return(m_Connection.SendUnreliable(msgType, msg)); } if (LogFilter.logError) { Debug.LogError("NetworkClient SendUnreliable with no connection"); } return(false); }