JoinOrCreateRoom(bool, int, int, Action<bool, SWJoinRoomReply, SWLobbyError>) Method
Namespace: SWNetwork.Lobby
Called by players to begin an asynchronous operation to randomly join a room in the Lobby server. If no available rooms were found, The player will create a new room with the specified wantRT, playerLimit, and player TTL. This method allows players to join the public rooms.

Declaration

1
public void JoinOrCreateRoom(bool wantRT, int playerLimit, int playerTimeToLive, Action<bool, SWJoinRoomReply, SWLobbyError> callback)
Copied!
Parameters
Type
Description
wantRT
bool
Indicates if the room requires RealTime service.
playerLimit
int
Indicates the maximum number of players can join the room.
playerTimeToLive
int
The maximum amount of time a player can stay inactive before been removed from the room.
callback
Action<bool,
The method to invoke when the join room operation is complete.
Last modified 2yr ago
Copy link