Skip to content
UCIK Docs
Esc
↑↓navigate↵open⌘Jpreview
On this page

Deliver shared game files

Read files distributed to every player of the game.

Publish shared files through a provider that supports title storage, such as EOS. Choose it in the Platform policy. Title files are read-only game content; use cloud saves for player uploads.

List published files

List published files
Preparing your graph…

Loading the interactive viewer.

Game module dependencies: UCIKCore, BetideCore.

#include "Engine/GameInstance.h"
#include "Platform/UCIKPlatformSubsystem.h"
#include "UCIKCore.h"

void ListGameFiles(UGameInstance &GameInstance)
{
    auto *Service = GameInstance.GetSubsystem<UUCIKPlatformSubsystem>();
    if (!Service)
        return;

    TArray<FString> Tags;
    Service->EnumerateTitleFiles(
        Tags, FBetideCallback<TArray<FUCIK_TitleFileMetadata>>::CreateWeakLambda(
                  &GameInstance, [](const TBetideResult<TArray<FUCIK_TitleFileMetadata>> &Result) {
                      if (!Result.bOk)
                      {
                          UE_LOG(LogUCIK, Warning, TEXT("%s"), *Result.Error.GetLogString());
                          return;
                      }
                      UE_LOG(LogUCIK, Log, TEXT("Published files: %d"), Result.GetValue().Num());
                  }));
}

Download a file

Download a file
Preparing your graph…

Loading the interactive viewer.

Game module dependencies: UCIKCore, BetideCore.

#include "Engine/GameInstance.h"
#include "Platform/UCIKPlatformSubsystem.h"
#include "UCIKCore.h"

void ReadGameConfig(UGameInstance &GameInstance)
{
    auto *Service = GameInstance.GetSubsystem<UUCIKPlatformSubsystem>();
    if (!Service)
        return;

    Service->ReadTitleFile(
        TEXT("game-config.json"),
        FBetideCallback<FUCIK_TitleFile>::CreateWeakLambda(
            &GameInstance, [](const TBetideResult<FUCIK_TitleFile> &Result) {
                if (!Result.bOk)
                {
                    UE_LOG(LogUCIK, Warning, TEXT("%s"), *Result.Error.GetLogString());
                    return;
                }
                UE_LOG(LogUCIK, Log, TEXT("Config bytes: %d"), Result.GetValue().Data.Num());
            }));
}

The first configured provider with title-file support supplies the result. A file name must match the published file exactly. Keep a local default for offline startup and reject invalid or incompatible content before applying it.

Read a JSON configuration

Read a JSON configuration
Preparing your graph…

Loading the interactive viewer.

Add UCIKNodes to your game module dependencies. This accepts the same config formats as the Blueprint example.

#include "Platform/UCIK_PlatformNodes.h"

bool ReadPlayerLimit(const FUCIK_TitleFile &File, int32 &OutLimit)
{
    const TMap<FString, FString> Config = UUCIK_PlatformLibrary::ParseTitleFileAsConfig(File);
    const FString *Value = Config.Find(TEXT("maxPlayers"));
    if (!Value || !Value->IsNumeric())
        return false;
    const float Limit = FCString::Atof(**Value);
    if (!FMath::IsFinite(Limit) || Limit < 1 || Limit > 64 || Limit != FMath::FloorToFloat(Limit))
        return false;
    OutLimit = static_cast<int32>(Limit);
    return true;
}

The Blueprint parser accepts flat JSON values or key=value text and returns strings. Nested JSON objects and arrays are omitted. Validate values before replacing active configuration.

Was this page helpful?