Joining Matches
In order to access online features, the player must be logged in with the Online Subsystem. Please visit the Authentication page for more information.
Joining Matches Directly
You can directly join a match by using the JoinKronosMatch node. Note that you only have to do this if you specifically told the matchmaking system to only search for games. Otherwise players join the game during matchmaking automatically. You will most likely only ever use this for a server browser.
There is no hard requirement on where you need to call this from. Most games will probably have this hooked to the OnClicked event of a widget button.

#include "KronosMatchmakingManager.h"
#include "KronosMatchmakingPolicy.h"// The session you want to join. You must get this somehow, for example by doing a SearchOnly matchmaking.
// Please note that search results cannot be replicated or sent via RPCs! This is an Online Subsystem limitation.
// Notice that this is passed into the lambda so that we can access it.
FKronosSearchResult SessionToJoin;
// Get the matchmaking manager.
UKronosMatchmakingManager* MatchmakingManager = UKronosMatchmakingManager::Get(this);
// Request a new matchmaking policy. This operation is async!
// If matchmaking is in-progress, it will be canceled first.
MatchmakingManager->CreateMatchmakingPolicy(FOnCreateMatchmakingPolicyComplete::CreateLambda([this, SessionToJoin](UKronosMatchmakingPolicy* MatchmakingPolicy)
{
// Matchmaking params are irrelevant in JoinOnly mode.
FKronosMatchmakingParams MatchmakingParams = FKronosMatchmakingParams();
// Matchmaking flags to use.
uint8 MatchmakingFlags = static_cast<uint8>(EKronosMatchmakingFlags::None);
// Tell the matchmaking that we only want to join a session that we've got already.
EKronosMatchmakingMode MatchmakingMode = EKronosMatchmakingMode::JoinOnly;
// Start matchmaking.
// Notice that we are using NAME_GameSession!
MatchmakingPolicy->StartMatchmaking(NAME_GameSession, MatchmakingParams, MatchmakingFlags, MatchmakingMode, 0.0f, SessionToJoin);
}));Finding Matches To Join
You find matches by using the FindKronosMatches node. This will give you an array of KronosSearchResult that you can iterate over (e.g. to create entries for a server browser).
There is no hard requirement on where you need to call this from. Most games will probably have this hooked to the OnClicked event of a widget button.

#include "KronosMatchmakingManager.h"
#include "KronosPartyManager.h"
#include "KronosMatchmakingPolicy.h"// Get the matchmaking manager.
UKronosMatchmakingManager* MatchmakingManager = UKronosMatchmakingManager::Get(this);
// Request a new matchmaking policy. This operation is async!
// If matchmaking is in-progress, it will be canceled first.
MatchmakingManager->CreateMatchmakingPolicy(FOnCreateMatchmakingPolicyComplete::CreateLambda([this](UKronosMatchmakingPolicy* MatchmakingPolicy)
{
// Parameters to be used for matchmaking.
FKronosMatchmakingParams MatchmakingParams;
MatchmakingParams.Playlist = TEXT("TeamDeathmatch");
MatchmakingParams.MaxSearchAttempts = 3;
MatchmakingParams.MaxSearchResults = 20;
MatchmakingParams.MinSlotsRequired = 0;
MatchmakingParams.bIsLanQuery = false;
MatchmakingParams.bSearchPresence = true;
// Matchmaking flags to use.
// You could use EKronosMatchmakingFlags::SkipEloChecks.
uint8 MatchmakingFlags = static_cast<uint8>(EKronosMatchmakingFlags::None);
// Tell the matchmaking that we only want to search for sessions.
EKronosMatchmakingMode MatchmakingMode = EKronosMatchmakingMode::SearchOnly;
// Start matchmaking.
// Notice that we are using NAME_GameSession!
MatchmakingPolicy->StartMatchmaking(NAME_GameSession, MatchmakingParams, MatchmakingFlags, MatchmakingMode);
}));Last updated