Skip to main content

Start the Matchmaking Process

Last updated on

The matchmaking can be started after the party leader invites another player to the party. The number of party members should match the configuration used when creating the matchmaking channel.

FString GameMode = FString("2v2");

FRegistry::Lobby.Connect();
FRegistry::Lobby.SetStartMatchmakingResponseDelegate(AccelByte::Api::Lobby::MatchmakingStartResponse.CreateLambda([](const FAccelByteModelsMatchmakingResponse& Result)
{
if (Result.Code == "0")
{
// Do something if StartMatchmakingResponseDelegate has been successful
}
else
{
// Do something if StartMatchmakingResponseDelegate has an error
}
}));

FRegistry::Lobby.SendStartMatchmaking(GameMode);