Exemplo n.º 1
0
    private void SendMessageHandler(ARWObject obj, object value)
    {
        string messageData = obj.GetString("message_data");

        Debug.Log(messageData);
        Message newMessage  = new Message(new JSONObject(messageData));
        Talk    currentTalk = ChatPanelManager.instance.user.playerTalks.Where(a => a.talkId == newMessage.talkId).FirstOrDefault();

        Debug.Log("=======> " + newMessage.body + " : " + newMessage.talkId);

        if (currentTalk == null)
        {
            return;
        }

        currentTalk.AddMessage(newMessage);
    }