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

onEndGame #

open suspend fun onEndGame(gameInstanceSnapshot: GameInstance.GameInstance, playerGameResults: List<PlayerGameResult>, requestExt: ExtEndGameRequest)

Called when receiving a game server request to end the game instance.

End the game instance using the GameInstance.GameInstance.end method. The players passed into the GameInstance.GameInstance.end method will have their game client’s GameInstanceApi::OnGameInstanceEnded event triggered once this plugin completes.

Default implementation: ends the game instance, triggers OnGameInstanceEnded event on player clients

Parameters #

gameInstanceSnapshot

The game instance that is ending.

playerGameResults

The player game results from the game server.

requestExt

The data sent along with the request.