How To Broadcast A Message To All Members Of Room

Broadcasting will send a message to all members of the room including yourself. The message will be received by OnMemberBroadcast.

We recommend your message includes the senders user ID and other information so that the recipients may detect who has sent the message and behave accordingly.

byte[] message = Encoding.UTF8.GetBytes(messageData);

bool reliable = false; // for UDP, if set to true, broadcast message will be sent as an RUDP packet

room.BroadcastTo(room.GetRoomID(), message, reliable);

Last updated