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.
- Unreal Engine 5 (built and tested on 5.8)
- Blueprints or C++
- Base or Advanced
- Tested against a generated backend
What you need
- A backend from BackendGen.dev, running on your PC (
start-local) or on a server (deploy guide). The download has the plugin in<YourGame>_Unreal. - Unreal Engine 5 and Visual Studio with the "Game development with C++" workload (Visual Studio 2026 for Unreal 5.8; 2022 works for 5.7 and older). Unreal builds the plugin for you when you open the project, Blueprint-only projects included.
The steps
Add the plugin
Close the editor. Copy
Plugins/StarRaidersBackend(your game's name instead of StarRaiders) from theStarRaiders_Unrealfolder of your download into your project'sPluginsfolder, next to the.uprojectfile. Open the project and click Yes when Unreal offers to build the missing modules.Check Edit > Plugins: "StarRaiders Backend" is ticked.
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.
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) andError(why it failed). For example, on Event BeginPlay of your Game Instance:- Sign In, Gamertag "Alice". Do this once: every later call carries her session and renews it by itself.
- On Success → Write Data, Path
users/Alice/profile/bio, Json Value from Json Make String "Top fragger". - 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.portorentries.0.score. Making JSON to send: Json Make String / Number / Bool / Object / Array.The same in C++
Add
"StarRaidersBackend"toPublicDependencyModuleNamesin 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, andDoneruns on the game thread. Build bodies withFJsonObjectandUStarRaidersBackendSubsystem::ToJson, or theUStarRaidersBackendJsonhelpers.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 Periodalltime: the top entries are inentries.0.player,entries.0.scoreand so on. - Cloud Save Slot
slot1, Json Data{"level":3,"coins":120}, then Cloud Load:data.levelis 3.
Anything without its own node works with Backend Request (Method, Path, Json Body). Your running server lists every endpoint at
/api/openapi.json.- Submit Score Board
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.
- Redeem Join Ticket: a player connected and sent the ticket from Join Game Server or matchmaking. On Success, let them in (
playeris who they really are); On Failure, refuse them. - Player Left, Hand Off Player (to another server or zone, with state), Upload Match (Server) for the skill rating, Verify Player Session.
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 see | What 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 0 | No 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. |
- Use HTTPS on a live server. Android and iOS refuse plain
http://by default. - Sessions last 30 days. When one runs out, the plugin signs in again by itself and repeats the request; if it can't, the subsystem's On Session Expired event fires, so you can show your sign-in screen.
- Never put the admin password or a server key in a game build. Players only ever need their own session.
- Not in the plugin yet: nodes for the realtime WebSocket (rooms, lobbies, direct messages) and live updates. Your backend has them; the Unity, Godot and JavaScript clients use them.
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