game / pragma.gameinstance / GameInstanceService / endGameV1 /

endGameV1 #

suspend fun endGameV1(session: PartnerSession, request: GameInstanceRpc.EndGameV1Request): GameInstanceRpc.EndGameV1Response

Signals a game has completed. Invoked by the game server.

The player game results and the game instance are passed into the GameInstancePlugin.onEndGame plugin method for an opportunity for custom data to be created on a ExtGameEnded that is sent to the players on a GameInstanceRpc.GameEndedV1Notification. If the game instance was in matchmaking, it will be removed. Any players that have not been removed from the match will be removed and have their player session updated. Finally, each individual party from the game will be sent back to the Party service via ReturnFromMatchV1.


  • GameInstancePlugin.onEndGame - Perform updates to player inventories and/or set custom data to send to the players.


  • PragmaError.GameInstanceService_UnknownGameInstanceId - If the game instance id from the request is not found.
  • PragmaError.GameInstanceService_PlayerNotInGameInstance - If a player from the request is not in the game instance specified.