game-common / pragma.gameinstance / GameInstancePlugin / handlePlayerJoinRequest /

handlePlayerJoinRequest #

open suspend fun handlePlayerJoinRequest(gameInstanceSnapshot: GameInstance.GameInstance, requestingPlayerId: <ERROR CLASS>, requestExt: ExtPlayerJoinGameInstanceRequest)

Called when receiving a player request to join a game instance.

Add the player to the game instance using the GameInstance.GameInstance.addPlayer method. Set data on the game instance by using GameInstance.GameInstance.dataStore or GameInstance.GamePlayer.dataStore.

Default implementation: prevents the player from joining the game instance.

Parameters #

gameInstanceSnapshot

The game instance to be joined.

requestingPlayerId

The player id of the player requesting to join the game instance.

requestExt

The data sent along with the request.