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

buildExtAddedToGame #

open suspend fun buildExtAddedToGame(gameInstance: GameInstance.GameInstance, player: GameInstance.GamePlayer): ExtAddedToGame

Called to prepare any custom data to send to the player client when they are joining a game.

Used by:

  • GameInstanceService.getGameStartDataV1
  • GameInstanceService.createMatchV2
  • GameInstanceService.foundMorePlayersV1

Return #

An ExtAddedToGame payload declaring any custom data to send to the player client for this game.

Parameters #

gameInstance

The game receiving a new player.

player

The new player being added to the game.