Use overlays and entitlements
Open platform UI and check access to game content.
Use the Platform policy for overlays and ownership queries. Available screens and entitlements depend on the signed-in provider and runtime platform.
Open the friends overlay
Loading the interactive viewer.
Game module dependencies: UCIKCore, BetideCore.
#include "Engine/GameInstance.h"
#include "Platform/UCIKPlatformSubsystem.h"
#include "UCIKCore.h"
void OpenFriendsOverlay(UGameInstance &GameInstance)
{
auto *Service = GameInstance.GetSubsystem<UUCIKPlatformSubsystem>();
if (!Service)
return;
FUCIK_PlatformUIRequest Request;
Request.Kind = EUCIK_PlatformUI::Friends;
Service->ShowUI(
Request,
FBetideCallback<bool>::CreateWeakLambda(&GameInstance, [](const TBetideResult<bool> &Result) {
if (!Result.bOk)
{
UE_LOG(LogUCIK, Warning, TEXT("%s"), *Result.Error.GetLogString());
return;
}
UE_LOG(LogUCIK, Log, TEXT("Overlay request accepted: %d"), Result.GetValue());
}));
}An empty Provider selects the first configured provider with overlay support. Bind On Overlay Toggled to suspend game input while it is open; do not pause a shared server for one player’s overlay.
Check ownership
Loading the interactive viewer.
Game module dependencies: UCIKCore, BetideCore.
#include "Engine/GameInstance.h"
#include "Platform/UCIKPlatformSubsystem.h"
#include "UCIKCore.h"
void CheckExpansion(UGameInstance &GameInstance, const FString &ProductId)
{
auto *Service = GameInstance.GetSubsystem<UUCIKPlatformSubsystem>();
if (!Service)
return;
Service->HasEntitlement(
ProductId,
FBetideCallback<bool>::CreateWeakLambda(&GameInstance, [](const TBetideResult<bool> &Result) {
if (!Result.bOk)
{
UE_LOG(LogUCIK, Warning, TEXT("%s"), *Result.Error.GetLogString());
return;
}
UE_LOG(LogUCIK, Log, TEXT("Owned: %d"), Result.GetValue());
}));
}This returns true when a responding provider lists the product with a positive quantity. A successful query can contain partial results if another provider failed. It checks ownership; it does not purchase, install, or download it. Use the product ID expected by the provider.
List entitlements and overlay state
List owned products
Loading the interactive viewer.
Watch overlay state
Loading the interactive viewer.
#include "Engine/GameInstance.h"
#include "Platform/UCIKPlatformSubsystem.h"
#include "UCIKCore.h"
void ListOwnedProducts(UGameInstance &GameInstance)
{
auto *Service = GameInstance.GetSubsystem<UUCIKPlatformSubsystem>();
if (!Service)
return;
Service->QueryEntitlements(FBetideCallback<TArray<FUCIK_Entitlement>>::CreateWeakLambda(
&GameInstance, [](const TBetideResult<TArray<FUCIK_Entitlement>> &Result) {
if (!Result.bOk)
{
UE_LOG(LogUCIK, Warning, TEXT("%s"), *Result.Error.GetLogString());
return;
}
for (const FUCIK_Entitlement &Item : Result.GetValue())
UE_LOG(LogUCIK, Log, TEXT("%s: %d"), *Item.ProductId, Item.Quantity);
}));
}
void WatchOverlay(UGameInstance &GameInstance, FDelegateHandle &Binding)
{
auto *Service = GameInstance.GetSubsystem<UUCIKPlatformSubsystem>();
if (!Service)
return;
Service->OnOverlayToggledNative.Remove(Binding);
Binding = Service->OnOverlayToggledNative.AddWeakLambda(
&GameInstance, [](bool bOpen) { UE_LOG(LogUCIK, Log, TEXT("Overlay open: %d"), bOpen); });
UE_LOG(LogUCIK, Log, TEXT("Overlay open: %d"), Service->IsOverlayActive());
}
void StopWatchingOverlay(UGameInstance &GameInstance, FDelegateHandle &Binding)
{
if (auto *Service = GameInstance.GetSubsystem<UUCIKPlatformSubsystem>())
Service->OnOverlayToggledNative.Remove(Binding);
Binding.Reset();
}Store the C++ delegate handle on the owning screen and stop watching when it closes.
For purchases and DLC installation, use the provider’s Steam, EOS, or mobile APIs. Title files and moderation have separate guides.