public void SendChatMessage() { var mes = new ChatMessage5(); mes.Message = _nameInput.text + ": " + _sendTextInput.text; _sendTextInput.text = ""; _client.Send((short)MessageType.Message, mes); }
private void OnClientDisconnected(NetworkMessage netMes) { var mes = new ChatMessage5(); mes.Message = "Player " + netMes.conn.connectionId + " disconnected."; AddMessageToChat(mes.Message); NetworkServer.SendToAll((short)MessageType.Message, mes); }
public void SendChatMessage() { var mes = new ChatMessage5(); mes.Message = "[Server] " + _sendTextInput.text; AddMessageToChat(mes.Message); _sendTextInput.text = string.Empty; NetworkServer.SendToAll((short)MessageType.Message, mes); }