internal static MessageCallback GetMessageEvent(UnityGuid messageId)
        {
            foreach (var e in m_EventMessageList)
            {
                if (e.messageId == messageId)
                {
                    return(e);
                }
            }

            var ret = new MessageCallback {
                messageId = messageId
            };

            m_EventMessageList.Add(ret);

            return(ret);
        }
 public static void UnregisterMessage(UnityGuid messageId, UnityEngine.Events.UnityAction <UnityEngine.Networking.PlayerConnection.MessageEventArgs> callback)
 {
     GetMessageEvent(messageId).callbacks -= callback;
 }