Table of Contents

StartGameSession

Methods
public void StartGameSession(Action<RequestResponse<bool>> onRequestFinished, int? maxPlayers = null, bool unlistLobby = true, bool closeLobby = false)

Starts a game session for the current Lobby. A room will be created by coherence and supplied through the LobbiesService.OnPlaySessionStarted Callback.

Parameters
Type Name Description
Action<RequestResponse<bool>> onRequestFinished

Callback that will be invoked when the request finished.

int? maxPlayers

Optional parameter to specify the max amount of Players allowed in the Room. If not supplied, the max amount of Players of the Lobby will be used.

bool unlistLobby

Optional parameter to unlist the Lobby. Unlisting the Lobby means that no other Player will be able to find the Lobby through matchmaking. True by default.

bool closeLobby

Optional parameter to close the Lobby. Closing the Lobby means that no other Player will be able to join the Lobby. False by default.