Download the Unreal SDK
Requirements
- Unreal Engine 5.4 to 5.8. Every version from 5.5 up is built and run against the full test suite before a release; 5.4 builds and links in a real project, but its test suite has not been run on it yet.
- A C++ project. Blueprint-only projects need the C++ toolchain installed to compile the plugin.
Setup
Install the plugin
Plugins/ folder, so you have YourProject/Plugins/FlockUnrealSdk/.Then right-click your .uproject → Generate Visual Studio project files, and rebuild. The
plugin is enabled by default — verify under Edit → Plugins → Online Platform → Flock SDK.Configure
DefaultGame.ini.Let the version bake
Calling Flock from C++
"Flock" to your game module’s Build.cs. A Blueprint-only project needs nothing here.Your first call
The SDK auto-initializes with your game, so there is nothing to start. Sign a player in, then read something back. The simplest sign-in is by device: no account screen and no password. It takes four things:- This install’s device ID. Leave the device ID empty and the device calls use the SDK’s own: a
GUID it makes the first time it is needed and keeps in
Saved/Flock/device_id.txt, so the same player comes back on every launch. Read it withThisDeviceId()on the auth provider, or Flock Get This Device Id in Blueprint. - Sign in once. A sign-in is saved between launches and restored as the SDK starts, so first check whether a player is signed in already, and sign in only when nobody is. A second sign-in ends the analytics session the first one started.
- Register, then log in only if needed. Logging in never creates an account, so a first launch must register. A register that creates the account also signs the player in. When the device already has an account, the register succeeds with Already Registered set and signs nobody in: log in then. Never log in after a register that signed the player in.
- The sign-in events. On Authenticated says a player is signed in, whichever way it happened. On Auth Expired says a saved sign-in could no longer be renewed, so the player must sign in again.
- Sign in once. Call a custom event such as Sign In With This Device, which starts with a Branch on Flock Is Authenticated. True means a saved sign-in was restored: do nothing more.
- Register, then log in only if needed. On False, run Flock Register With Device with its Device Id left empty, so it uses this install’s ID. From its On Success, break the Result and branch on Already Registered: True runs Flock Login With Device, its Device Id empty too; False means registering signed the player in.
- Run each On Failure through To String (Flock Error) into Print String: the text says what is wrong and how to fix it.

Sign in once: when nobody is signed in, register the device; when it already has an account, log in with the same ID.
UFUNCTION()s:
Signed in as … then Playing … in the Output Log. A failure logs the
call that failed, the server’s reason and a Fix: line: see Error handling.
An empty device ID means this install’s own for LoginWithDevice, RegisterWithDevice and
LinkDevice and their nodes; any other ID is sent exactly as you pass it. Signing out keeps it. A new
one is made when the file is gone (a reinstall on a phone, a deleted or cleaned Saved folder), and
with a new ID comes a new player, with none of their progress: to keep players across a reinstall or a
new device, offer account linking (an email or a platform account). When
the file can be neither read nor written, the SDK logs a warning saying why and how to fix it, and uses
an ID for that run only. (FPlatformMisc::GetDeviceId cannot be the ID: it is empty on Windows, Mac
and Linux.)
Pass an ID of your own only in two cases:
- Your game already signs players in with an ID of its own (a GUID kept in a save game or a file, as earlier versions of this page showed): keep passing that same ID. Leaving it empty would sign every existing player in to a new, empty account.
- Two copies of the game started from one project folder (Play In Editor beside a standalone game,
two game clients on one machine) share
Saved/, so they share the kept ID and are one player. Pass another ID in one of them.
TWeakObjectPtr to the SDK, never the raw UFlockSubsystem* or this. The
answer can arrive after the game has started shutting down, and a raw pointer would then point at
nothing.Initialization
Auto Initialize on Load (in Flock SDK Settings, under Initialization) is on by default, soUFlockSubsystem is running before BeginPlay. To defer past a splash screen or EULA, turn it off and
call InitializeFromSettings() yourself (in Blueprint, Initialize From Settings on the Flock
subsystem):
Authenticate a player
Email, device ID, Google, Apple, Steam, Facebook, and Discord. The SDK exchanges the credential your platform SDK produced for a Flock session, stores the tokens encrypted between launches, restores the session automatically on startup, and refreshes expired access tokens silently. Every method is an async node under Flock | Auth (Flock Login With Email, Flock Register With Device, and so on), or a call on the auth provider in C++. Login and register are separate calls: logging in never creates an account, and a register that creates one also signs the player in. Each method follows the device pattern in Your first call. For example, an email sign-in from your own sign-in screen:Work with your game data
One menu click turns your backend’s templates, configs, and shops into typed nodes. Tools → Flock → Sync Schemas — no C++, no toolchain, no compile step.
Tools → Flock → Sync Schemas generates typed assets from your own schemas.

Get Gameplay fetches, converts, and hands back a typed struct — break it for real pins.
Get → the engine’s Set members in struct → Save:

Get hands out the row ID alongside the struct, because Save needs it.
Get fetched.

Ticking a member exposes its pin — untouched members are left exactly as they were.

Purchase by picking an item — the ID is baked in and cannot be mistyped.
Prefer C++?
Switch Codegen Target toC++ and a sync emits a generated module instead — a USTRUCT per
template and config, a UENUM per ID set, and a typed call surface.

Codegen Target picks what a sync emits. Blueprint is the default.
Source/FlockGenerated and registers it in your .uproject. Build and
restart the editor, then add the module to your game module’s Build.cs and include its header:
PlayerLevel template, a GemPack shop item and a Gold
currency; yours follow your own schemas.
BlueprintType, so graphs still see
your types after switching.
Samples
The plugin ships two samples made of Blueprints only, with no C++ of their own (the shop sample from 1.48.0). Turn on Show Plugin Content in the Content Browser’s settings to see them under the plugin’sContent/Samples. Both need Project Settings → Plugins → Flock SDK Settings filled in first.
- Shop (
Content/Samples/Shop) — open theFlockShopSamplelevel and play it: log a device in, open the shop, and buy with the wallet or real money (the phone’s store, or a web checkout on Windows, Mac and Linux), use what the player holds, restore purchases. It needs a shop in the Flock dashboard, the tagcurrencyon the player template that holds the wallet, and for real-money items their store product ids. See Shops & inventory and In-App Purchases. - Multiplayer (
Content/Samples/Multiplayer) — set Game Instance Class toBP_FlockSampleGameInstanceunder Project Settings → Maps & Modes, then play theFlockMultiplayerSamplelevel in two standalone games: sign in with a different device name in each (one name would make them one player), then host and join by code, or quick match with a queue your game has in the Flock dashboard. See Multiplayer.
Explore features
Players & auth
Account linking
Player data
Shops & inventory
In-App Purchases
Web Payments
Remote config
Leaderboards
Game notifications
Assets
Analytics & events
Multiplayer
Playtesting with Protokite
Advanced settings
Project Settings also tunes analytics, HTTP retries, the offline cache, and the codegen paths. The defaults are sensible — change them only when you need to. Turning on Enable Debug Logs traces every network call under theLogFlock category, and each line
names its caller so you can tell a Blueprint graph from C++:
Offline caching
Config, game, shop-catalog, and player-template reads are cached to disk, scoped to your game version, and served when the server is unreachable — the server is always tried first, and there are no TTLs. A signed-in player’s config values are kept per player, so offline a read gives that player’s last values, else the game-wide ones, never another player’s. Player data writes queue offline and replay automatically when the connection returns. Currency grants never do: a grant fails rather than being queued, and is never re-sent after an ambiguous failure, so it cannot double-credit.Error handling
Every call answers with aTFlockResult<T> rather than throwing — Unreal builds with exceptions off.
Check bSuccess, then read Value or Error. Inside any completion, where Result is the
TFlockResult it received:
Error.ToDisplayText() says what went wrong and how to fix it: the call that failed, the server’s own
reason, the coded identifier and the HTTP status, then a Fix: line. The Output Log carries the same
text for every failed call.
Error.Message holds what went wrong on its own and Error.Hint the fix on its own; neither is ever
empty on a failure.
In Blueprint, every async node has an On Failure pin carrying the same Error. To String (Flock
Error) turns it into the display text, and Break Flock Error gives its Error Code, an enum to
compare without matching strings.