Multiplayer
Crossplay Lobbies in C++
Create and join crossplay lobbies from C++
Crossplay Lobbies in C++
#include "Lobbies/UCIKLobbySubsystem.h"
FUCIK_LobbySettings Settings;
Settings.MaxMembers = 4;
Settings.JoinPolicy = EUCIK_LobbyJoinPolicy::Public;
UUCIKLobbySubsystem* Lobbies = GetGameInstance()->GetSubsystem<UUCIKLobbySubsystem>();
Lobbies->CreateLobby(TEXT("Party"), Settings,
FUCIKCallback<FUCIK_Lobby>::CreateWeakLambda(this, [this](const TUCIKResult<FUCIK_Lobby>& Result)
{
if (!Result.bOk || !Result.Value.IsSet())
{
return;
}
ShowLobby(*Result.Value);
}));Finding uses FindLobbies(Filters, MaxResults, Callback). Pass a returned FUCIK_Lobby to JoinLobby(Lobby, true, Callback) to join and travel. Named operations use UpdateLobby and LeaveLobby.
See Blueprint usage and Network setup.
Use the unified subsystem first. Use a kit-specific lobby interface only for that platform's exact option set.