I am trying to build a chat in Unity and I have a problem setting the UI text with the message received. I have the following code
public async void Login()
{ login...
var messageList = new List<IApiChannelMessage>(100);
_socket.ReceivedChannelMessage += message =>
{
Debug.Log("received a new message " + message.Content);
ShowMessage(message.Content, false);
Debug.LogFormat("Received message: '{0}'", message);
};
If player A sends a message, I get only the second debug on player B, the first debug and ShowMessage doesn’t work. If player B sends a message, on player B all works fine. Can you help me understand this ? Thankyou.