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

onEndGame #

open suspend fun onEndGame(gameInstance: GameInstance.GameInstance, playerGameResults: List<PlayerGameResult>, requestExt: ExtEndGameRequest): Map<<ERROR CLASS>, ExtGameEnded>

Called when the game is ending to prepare any custom data to send to players from the game.

Players will receive a GameInstanceRpc.GameEndedV1Notification with the ExtGameEnded returned from this method. If the player does not need to receive this notification, simply do not return an ext for the player.

Used by:

  • GameInstance.endGameV1

Return #

A map of the player ids and custom ExtGameEnded data to send to the player client.

Parameters #


The game instance that is ending.


The player game results from the game server.


An ExtEndGameRequest payload declaring any custom data for this request.