game-common / pragma.matchmaking / MatchmakingPlugin / initialize /

initialize #

open fun initialize(queueKey: MatchmakingRpc.MatchmakingQueueKey, matchable: Matchmaking.Matchable): NewGameInstance?

Called with a new Matchmaking.Matchable before it enters matchmaking. Perform any validation logic or initial transformations to party, players, or ExtMatchable here. Return a NewGameInstance to start the game instance before it enters the matchmaking queue. Return null to continue to the matchmaking queue. If the Matchmaking.Matchable is not valid, prevent it from entering matchmaking by throwing an ExtException.

If returning a NewGameInstance:

If this method throws an exception the Matchmaking.Matchable that is being initialized will be rejected from the queue.

Parameters #

queueKey

There are separate queues for each distinct MatchmakingQueueKey.

matchable

The newly created Matchmaking.Matchable representing a matchable entering a matchmaking queue.