Creating Parties
Creating The Party

#include "KronosMatchmakingManager.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 the party session.
// Here's a private party configuration for up to 5 players.
FKronosHostParams HostParams;
HostParams.MaxNumPlayers = 5;
HostParams.bShouldAdvertise = false;
HostParams.bIsLanMatch = false;
HostParams.bUsesPresence = true;
HostParams.bAllowInvites = true;
HostParams.bAllowJoinViaPresence = true;
// If for some reason private sessions are not suitable for you,
// you can make the session hidden instead. Hidden sessions can only be found when SpecificSessionQuery is used.
// Steam for example doesn't allow you to join a friend through the Steam Overlay if he is in a private session.
// Hidden sessions only make sense with bShouldAdvertise set to true!
HostParams.bHidden = false;
// Initialize matchmaking params from the host params.
// Only the host params matter when starting matchmaking in CreateOnly mode.
FKronosMatchmakingParams MatchmakingParams = FKronosMatchmakingParams(HostParams);
// No matchmaking flags needed.
uint8 MatchmakingFlags = static_cast<uint8>(EKronosMatchmakingFlags::None);
// Tell the matchmaking that we only want to create a session.
EKronosMatchmakingMode MatchmakingMode = EKronosMatchmakingMode::CreateOnly;
// Start matchmaking.
// Notice that we are using NAME_PartySession!
MatchmakingPolicy->StartMatchmaking(NAME_PartySession, MatchmakingParams, MatchmakingFlags, MatchmakingMode);
}));The Starting Level Param
Party Visibility
Last updated