Open gotanidea opened 6 years ago
I want to notify all clients when all players in a lobby are ready. I added this code in BaseLobby.cs - OnAllPlayersReady() function:
IServerSocket server = new ServerSocketUnet(); server.Connected += peer => { peer.SendMessage(0, "What's up?"); };
And this code in ConnectionToMaster.cs - Start() function:
IClientSocket client = new ClientSocketUnet(); client.Connected += () => { client.Peer.MessageReceived += message => { Debug.Log("I've got the message!: " + message.AsString()); }; };
But I don't get any message on the client. How to make the server send message to the clients when all players in the lobby are ready?
I want to notify all clients when all players in a lobby are ready. I added this code in BaseLobby.cs - OnAllPlayersReady() function:
And this code in ConnectionToMaster.cs - Start() function:
But I don't get any message on the client. How to make the server send message to the clients when all players in the lobby are ready?