game-common / pragma.matchmaking / MatchmakingPlugin / initialize /
open fun initialize(queueKey: MatchmakingQueueKey, potentialMatch: PotentialMatch)
Called with a new PotentialMatch before it enters matchmaking. Perform any validation logic or initial transformations to the PotentialMatch here. If the PotentialMatch is not valid, prevent it from entering matchmaking by throwing an ExtException.
When a new PotentialMatch is created by the engine, all party members are defaulted team 0.
Things that can be done in this method:
- Assign players to a team by calling PotentialMatch.assignPlayersToTeam or PotentialMatch.assignPartiesToTeam
- If the PotentialMatch is ready to start, start it now by calling PotentialMatch.startMatch
If this method throws an exception the PotentialMatch that is being initialized will not end up in queue
There are separate queues for each distinct MatchmakingQueueKey.
The newly created PotentialMatch representing a party entering a matchmaking queue.