The randomized client id for this controller and client.
This is fired when a WebRTC peer attempts to connect to the host client (this will only
be fired if your client is the host). Return true to accept the connection. Return
false to reject it.
ReadonlyclientThe randomized client id for this controller and client.
ReadonlyhostReadonlyisReadonlymultiplayerReadonlystunDestroy this controller and clean everything up.
Get all room client ids.
For host clients, this includes the host client id whereas WebrtcMultiplayerController.getConnectedClientIds does not.
Get all connected client ids.
For host clients, this does ont include the host client id whereas WebrtcMultiplayerController.getAllClientIds does.
Call this to connect to the multiplayer server.
Whether or not the connection was initialized (it won't be initialized, for example, if the WebRTC connections already exist).
Indicates whether ths client is connected to a multiplayer room.
If this controller is the host, it'll behave differently:
Send a message to the room participants.
Send a message to just a single client. This is only allowed on a host client.
A controller that connects to the multiplayer api and establishes a WebRTC connection to the selected room, or, if the room does not exist yet, creates the room and becomes the host.
Make sure, after constructing this class, to call WebrtcMultiplayerController.initConnection when you're ready to being the connection.