Multiplayer
Crossplay Events in C++
Bind to normalized crossplay events from C++
Crossplay Events in C++
Bind dynamic delegates from a UObject; handler functions must be UFUNCTION() methods with matching signatures.
#include "Lobbies/UCIKLobbySubsystem.h"
void UMyPartyManager::InitializeEvents()
{
UUCIKLobbySubsystem* Events =
GetGameInstance()->GetSubsystem<UUCIKLobbySubsystem>();
Events->OnMemberJoined.AddDynamic(this, &UMyPartyManager::HandleMemberJoined);
Events->OnJoinRequested.AddDynamic(this, &UMyPartyManager::HandleJoinRequested);
}
UFUNCTION()
void UMyPartyManager::HandleMemberJoined(
const FUCIK_LobbyHandle& Lobby,
const FUCIK_PlayerHandle& Member);
UFUNCTION()
void UMyPartyManager::HandleJoinRequested(const FUCIK_Lobby& Lobby);Also bind OnMemberLeft (FUCIK_MemberLeftEvent: reason and whether the member owned the lobby), OnOwnerChanged (FUCIK_OwnerChangedEvent: new and previous owner), OnLobbyUpdated, OnInviteReceived, OnInviteAccepted, OnLobbyMessage, and OnJoinRequestRejected as needed. Each event also has a fully typed native delegate. Session providers with the Events capability surface the same shape through UUCIK_SessionEventsSubsystem.
See Blueprint usage.
Use the unified subsystem first. Use a kit-specific notification only for that platform's exact option set.