void SendChat() { Chat_C2S chat = new Chat_C2S(); chat.userId = userId; chat.text = chatText; SockectController.instance.SendProto(chat); }
void EncodeAndDecodeTest() { Chat_C2S chat = new Chat_C2S(); chat.userId = userId; chat.text = chatText; Debug.Log("origin data " + chat.ToString()); Chat_C2S chatNew = new Chat_C2S(); chatNew.Decode(chat.Encode().ToArray()); Debug.Log("new data " + chatNew.ToString()); }
void EncodeAndDecodeTest() { Chat_C2S chat = new Chat_C2S(); chat.userId = userId; chat.text = chatText; Debug.Log("origin data " + chat.ToString()); Chat_C2S chatNew = new Chat_C2S(); chatNew.Decode(chat.Encode().ToArray()); Debug.Log("new data " + chatNew.ToString()); }