CreateRoom(bool, int, Action<bool, string, SWLobbyError>) Method

Namespace: SWNetwork.Lobby

Called by players to begin an asynchronous operation to create a room and using the specified wantRT, and PlayerLimit.

Declaration

public void CreateRoom(bool wantRT, int playerLimit, Action<bool, string, SWLobbyError> callback)

Parameters

Type

Description

wantRT

bool

Indicates if the room requires RealTime service.

playerLimit

int

The maximum number of players can join the room.

callback

Action<bool,

string, SWLobbyError>

The method to invoke when the create room operation is complete.

Overloads

CreateRoom(string, bool, int, Action<bool, string, SWLobbyError>) Method

Called by players to begin an asynchronous operation to create a room and using the specified string room custom data, wantRT, and PlayerLimit.

Declaration

public void CreateRoom(string customData, bool wantRT, int playerLimit, Action<bool, string, SWLobbyError> callback)

Parameters

Type

Description

customData

string

The string room custom data.

wantRT

bool

Indicates whether the room requires RealTime service.

playerLimit

int

The maximum number of players can join the room.

callback

Action<bool,

string, SWLobbyError>

The method to invoke when the create room operation is complete.

CreateRoom(object, bool, int, Action<bool, string, SWLobbyError>) Method

Called by players to begin an asynchronous operation to create a room and using the specified serializable object room custom data, wantRT, and PlayerLimit.

Declaration

public void CreateRoom(object customData, bool wantRT, int playerLimit, Action<bool, string, SWLobbyError> callback)

Parameters

Type

Description

customData

object

The serializable object room custom data

wantRT

bool

Indicates whether the room requires RealTime service

playerLimit

int

The maximum number of players can join the room.

callback

Action<bool,

string, SWLobbyError>

The method to invoke when the create room operation is complete.

CreateRoom(string, bool, int, SWLobbyIndexData, Action<bool, string, SWLobbyError>) Method

Called by players to begin an asynchronous operation to create a room and using the specified string room custom data, wantRT, PlayerLimit, and index data.

Declaration

public void CreateRoom(string customData, bool wantRT, int playerLimit, SWLobbyIndexData indexData, Action<bool, string, SWLobbyError> callback)

Parameters

Type

Description

customData

string

The string room custom data.

wantRT

bool

Indicates whether the room requires RealTime service.

playerLimit

int

The maximum number of players can join the room.

indexData

SWLobbyIndexData

The index data of the room.

callback

Action<bool,

string, SWLobbyError>

The method to invoke when the create room operation is complete.

CreateRoom(object, bool, int, SWLobbyIndexData, Action<bool, string, SWLobbyError>) Method

Called by players to begin an asynchronous operation to create a room and using the specified serializable object room custom data, wantRT, PlayerLimit, and index data.

Declaration

public void CreateRoom(object customData, bool wantRT, int playerLimit, SWLobbyIndexData indexData, Action<bool, string, SWLobbyError> callback)

Parameters

Type

Description

customData

object

The serializable object room custom data.

wantRT

bool

Indicates whether the room requires RealTime service.

playerLimit

int

The maximum number of players can join the room.

indexData

SWLobbyIndexData

The index data of the room.

callback

Action<bool,

string, SWLobbyError>

The method to invoke when the create room operation is complete.

CreateRoom(string, bool, int, int, bool, SWLobbyIndexData, Action<bool, string, SWLobbyError>) Method

Called by players to begin an asynchronous operation to create a room and using the specified string room custom data, wantRT, PlayerLimit, PlayerTimeToLive, isPrivate, and index data.

Declaration

public void CreateRoom(string customData, bool wantRT, int playerLimit, int playerTimeToLive, bool isPrivate, SWLobbyIndexData indexData, Action<bool, string, SWLobbyError> callback)

Parameters

Type

Description

customData

string

The string room custom data.

wantRT

bool

Indicates whether the room requires RealTime service.

playerLimit

int

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.

isPrivate

bool

Indicates whether the room is private.

indexData

SWLobbyIndexData

The index data of the room.

callback

Action<bool,

string, SWLobbyError>

The method to invoke when the create room operation is complete.

CreateRoom(object, bool, int, int, bool, SWLobbyIndexData, Action<bool, string, SWLobbyError>) Method

Called by players to begin an asynchronous operation to create a room and using the specified serializable object room custom data, wantRT, PlayerLimit, PlayerTimeToLive, isPrivate, and index data.

Declaration

public void CreateRoom(object customData, bool wantRT, int playerLimit, int playerTimeToLive, bool isPrivate, SWLobbyIndexData indexData, Action<bool, string, SWLobbyError> callback)

Parameters

Type

Description

customData

string

The serializable object room custom data.

wantRT

bool

Indicates whether the room requires RealTime service.

playerLimit

int

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.

isPrivate

bool

Indicates whether the room is private.

indexData

SWLobbyIndexData

The index data of the room.

callback

Action<bool,

string, SWLobbyError>

The method to invoke when the create room operation is complete.