static void Dispatch(NetWorkMessage msg) { try { InputNetworkEventProxy.DispatchMessageEvent(msg.m_MessageType, msg.m_data); } catch (Exception e) { Debug.LogError("Message Error:->" + Json.Serialize(msg.m_data) + "<-\n" + e.ToString()); } }
static void Dispatch(NetWorkMessage msg) { try { InputNetworkEventProxy.DispatchMessageEvent(msg.m_MessageType, msg.m_data); } catch (Exception e) { string messageContent = ""; if (msg.m_data != null) { messageContent = Json.Serialize(msg.m_data); } Debug.LogError("Message Error: MessageType is ->" + msg.m_MessageType + "<- MessageContent is ->" + messageContent + "<-\n" + e.ToString()); } }
static void Dispatch(string message) { try { if (message != null && message != "") { message = WWW.UnEscapeURL(message); message = message.Replace(c_endCharReplaceString, c_endChar.ToString()); Dictionary <string, object> data = Json.Deserialize(message) as Dictionary <string, object>; InputNetworkEventProxy.DispatchMessageEvent(data["MT"].ToString(), message, data); } } catch (Exception e) { Debug.LogError("Message Error:->" + message + "<-\n" + e.ToString()); } }