Guides · Unreal Engine

Use your backend from Unreal Engine

Every game download comes with an Unreal Engine 5 plugin made for your backend. Drop it into your project and sign players in, save their data, post leaderboard scores and keep cloud saves, from Blueprints or C++. With Advanced, your dedicated servers get their own nodes too.

What you need

The steps

  1. Add the plugin

    Close the editor. Copy Plugins/StarRaidersBackend (your game's name instead of StarRaiders) from the StarRaiders_Unreal folder of your download into your project's Plugins folder, next to the .uproject file. Open the project and click Yes when Unreal offers to build the missing modules.

    Check Edit > Plugins: "StarRaiders Backend" is ticked.

  2. Point it at your server

    Edit > Project Settings > Plugins > StarRaiders Backend > Url. The default is the backend on your own PC (start-local); for your live server use its address, e.g. https://api.mygame.com, without /api.

    Then set Project Settings > Project > Description > Project Version to your game's version. Every request sends it, and the backend turns away builds older than its minimum version.

  3. Sign in and save data (Blueprints)

    Right-click in any Blueprint graph and type StarRaiders Backend. Every call is one node with On Success and On Failure, both giving a Result: Ok, Status, Json (the server's answer) and Error (why it failed). For example, on Event BeginPlay of your Game Instance:

    1. Sign In, Gamertag "Alice". Do this once: every later call carries her session and renews it by itself.
    2. On Success → Write Data, Path users/Alice/profile/bio, Json Value from Json Make String "Top fragger".
    3. On Success → Read Data, same path → Json Get String (Result Json, Field empty) → Print String.

    Paths work like folders. Write Data replaces what's at a path, Update Data merges fields into it, Read Data reads it and Delete Data removes it. Your backend's access rules decide who may change what, so Bob can't write to users/Alice: that comes back on On Failure with the server's reason.

    Reading answers: the Json Get String / Number / Int / Bool / Array nodes take a field path such as player, server.port or entries.0.score. Making JSON to send: Json Make String / Number / Bool / Object / Array.

  4. The same in C++

    Add "StarRaidersBackend" to PublicDependencyModuleNames in your game's .Build.cs, then:

    #include "StarRaidersBackendSubsystem.h"
    
    void AMyPlayerController::BeginPlay()
    {
    	Super::BeginPlay();
    	UStarRaidersBackendSubsystem* Backend = UStarRaidersBackendSubsystem::Get(this);
    
    	Backend->SignIn(TEXT("Alice"), FString(), [Backend](const FStarRaidersBackendResult& R)
    	{
    		if (!R.bOk) { UE_LOG(LogTemp, Warning, TEXT("Sign-in failed (%d): %s"), R.Status, *R.Error); return; }
    
    		// Save to her own profile (the access rules let only Alice change users/Alice)
    		Backend->Request(TEXT("PATCH"), TEXT("users/Alice/profile"), TEXT("{\"level\":7,\"class\":\"Pilot\"}"),
    			[](const FStarRaidersBackendResult& Saved) { UE_LOG(LogTemp, Log, TEXT("Saved: %d"), Saved.bOk); });
    	});
    }

    Request(Method, Path, JsonBody, Done) reaches every endpoint of your backend, and Done runs on the game thread. Build bodies with FJsonObject and UStarRaidersBackendSubsystem::ToJson, or the UStarRaidersBackendJson helpers.

  5. Leaderboards and cloud saves (Advanced)

    With the Advanced licence the plugin has nodes for the Add-on features: Submit Score, Get Leaderboard, Cloud Save / Load / List / Delete, Get Wallet, Buy Item, Redeem Coupon, Open Loot, Join Queue, Join Game Server, Remote Config, Sign In With Platform and more. Turn the feature on in the generator and add a board in leaderboards.json; then, for example:

    • Submit Score Board highscore, Score 1234, then Get Leaderboard Period alltime: the top entries are in entries.0.player, entries.0.score and so on.
    • Cloud Save Slot slot1, Json Data {"level":3,"coins":120}, then Cloud Load: data.level is 3.

    Anything without its own node works with Backend Request (Method, Path, Json Body). Your running server lists every endpoint at /api/openapi.json.

Your dedicated servers (Advanced)

The same plugin runs in your dedicated server build, with its own nodes under StarRaiders Backend | Game Server. There it uses a server key (admin dashboard > Server keys > New key, scopes "fleet" and "matches", plus "sessions" to check player tokens). Never put the key in a game client build: give it to the server as environment variables, UBG_SERVER_KEY and UBG_BACKEND_URL.

Once the server is listening, call Start Heartbeat (Region, Mode, Zone, the public Address and Port, Capacity). It registers the server and keeps reporting how many players are on it, counted from Redeem Join Ticket and Player Left.

Running your servers with Omni Cluster (included with Advanced, on Windows or Linux)? It starts your Unreal server builds, registers them and gives each one its id and port. Still call Start Heartbeat (Port 0 uses the port Omni Cluster gave the server) with the same server key as Omni Cluster: the player count is what lets Omni Cluster start another server when one fills up.

Good to know

What you seeWhat it means
426 "Upgrade Required"The build's Project Version is older than the server's minimum version. Raise the Project Version, or the minimum in backend-config.json.
403 "This gamertag belongs to another device"A gamertag belongs to the device that first signed in with it. Moving to a new PC uses a profile transfer code.
403 "Permission denied by access rules"The player tried to change data that isn't theirs. Test the request with Would this be allowed? on the generator's Players & Security tab.
Status 0No connection: the server isn't running, the Url is wrong, or (on a phone) it isn't HTTPS. On a phone or another PC, 127.0.0.1 means "this device": use your PC's network address instead.
Unreal says the plugin "could not be compiled"Visual Studio or its C++ game workload is missing. Install it from the Visual Studio Installer, then open the project again.

We built the plugin in Unreal Engine 5.8 with Visual Studio 2026 and ran it against a freshly generated Advanced backend: sign-in, saving and reading data from C++ and Blueprint nodes, a refused write, leaderboards, cloud saves, and a game server registering, checking a player's join ticket and seeing them leave.

Haven't got a backend yet?

Try the generator free with an account: fill in your settings and see exactly what you'd get, the Unreal plugin included. Buy a licence when you want to download.

Try the generator freeDeploy guide