Skip to main content
Migrate Already selling? Move your customers to Keylight without re-issuing a single key.
Keylight

Use case · Unreal Engine

Licensing for Unreal Engine games

Sell your Unreal game direct and license it natively — the Keylight C++ plugin ships as source you drop into Plugins/, exposes a Blueprint-callable subsystem, and verifies tamper-proof Ed25519 leases offline without a backend.

Start Free

For studios and indies selling Unreal Engine games direct.

  • Storefront cuts and a lost player relationship.
  • License checks must keep working offline during play.
  • You don't want to build a licensing backend.

Updated June 2026

Selling an Unreal Engine game directly — through your own site, Stripe, and a license key in the player’s inbox — is increasingly viable for studios and solo developers who want to keep the full customer relationship instead of handing it to a storefront. The licensing problem for native engines is real, though: a game binary needs to verify its license without an always-on network call, without a fragile handmade crypto implementation, and without an entire backend to maintain.

The Keylight C++ plugin solves this natively. It ships as Unreal plugin source you drop into your Plugins/ directory, exposes UKeylightSubsystem as a Blueprint-callable subsystem, and handles activation, offline lease verification, and background revalidation in C++ — the same architecture the Swift SDK provides for Apple platforms.

Why direct matters more for games than people expect

Storefronts like Steam take 30% off the top and, more importantly, own the customer data. When someone buys your game through Steam, you receive a cut of a transaction — not an email address, not a way to follow up about a sequel, not a direct commercial relationship that persists outside that platform.

Direct distribution changes the math entirely. A player who buys through your Stripe checkout becomes a customer you can email, discount, support personally, and retain through future releases. The average Steam game earns most of its revenue in the first two weeks of launch; a direct-sold title can build a back-catalog business because you can reach the people who already bought.

The challenge is that Steam was quietly handling something important: verifying that the person launching the game actually owns it. Remove the storefront and you need to solve that yourself — signed keys, device activation, offline verification, and a dashboard for support. That is the problem Keylight is built for.

What game licensing requires

An Unreal game that sells direct needs a complete licensing layer, not just a key string. The minimum viable implementation covers several concerns.

Key generation and delivery. When a player completes checkout, a unique license key must be minted and delivered — in an email receipt and on the confirmation page. The key must be tied to the purchase record and unforgeable.

Cryptographic signing. A random string is trivially shareable. A signed entitlement payload is not — it can only be forged by someone who holds the private key. Keylight signs a payload containing the player’s entitlements, the activation limit, and an expiry using Ed25519. Your game ships with the public half; only Keylight’s server holds the private half.

Offline verification. The game verifies the signature against the bundled public key locally. No network call required at launch. If the signature is valid and the entitlement fields pass your checks, the license is accepted — even on a plane, in a region with poor connectivity, or behind a firewall.

Device activation limits. Each key carries an activation ceiling. Keylight tracks activations by device fingerprint server-side; when a player hits their limit, the activation call returns a clear error you can surface as a “transfer license” flow.

A dashboard. Players lose keys, switch PCs, and file support tickets. You need a way to look up a license, see which devices it is activated on, reset an activation, and revoke a key when a refund is issued.

Offline-first is non-negotiable for games

Desktop apps that require a live server call to open feel broken to users. Games are even less forgiving: a player on a long-haul flight, at a LAN party with a shaky router, or in the middle of a play session when their ISP hiccups should not see a licensing error.

The tamper-proof offline lease architecture solves this cleanly. The lease is an Ed25519-signed JSON payload stored locally after the first successful activation. At every subsequent launch, the game verifies the signature against the bundled public key — the check is local, instant, and has no network dependency.

Periodic online revalidation still happens when the game detects connectivity, to pick up revocations and entitlement updates. But the critical path — “can I launch?” — is always local. A revoked key transitions the game to an unlicensed state only after the next successful server contact, not mid-session.

This also makes your licensing infrastructure more resilient. If Keylight is unreachable for an hour, your players notice nothing. They are verifying against a signature that was written to disk at activation time.

Integrating with the Keylight C++ plugin

The Keylight C++ plugin ships as Unreal Engine source — drop it into your project’s Plugins/ directory and add it to your .uproject file. It exposes UKeylightSubsystem, an engine subsystem callable from both C++ and Blueprints.

Add it to your project

# Drop into your project
cp -r keylight-cpp/unreal/KeylightPlugin/ YourGame/Plugins/Keylight/

In YourGame.uproject, add to the plugins array:

{
  "Name": "Keylight",
  "Enabled": true
}

The plugin uses Unreal’s built-in FHttpModule — no third-party HTTP library required.

Configure and activate from C++

#include "KeylightSubsystem.h"

void AYourGameMode::BeginPlay()
{
    Super::BeginPlay();

    UKeylightSubsystem* Keylight = GetGameInstance()
        ->GetSubsystem<UKeylightSubsystem>();

    // Your tenant's trusted Ed25519 public keys (kid -> base64),
    // from your Keylight dashboard.
    TMap<FString, FString> TrustedKeys;
    TrustedKeys.Add(TEXT("k1"), TEXT("<base64-public-key>"));

    // Configure once — tenant and product from your dashboard.
    Keylight->Configure(TEXT("your-tenant"), TEXT("your-game"), TrustedKeys);

    // Bind the completion delegate (fires on the game thread).
    Keylight->OnActivateComplete.AddDynamic(
        this, &AYourGameMode::OnActivationResult);

    // On first launch, activate the player's key.
    Keylight->Activate(PlayerEnteredKey);
}

// Mark the handler UFUNCTION() in your header so AddDynamic can bind it.
void AYourGameMode::OnActivationResult(
    bool bSuccess, EKeylightState State, const FString& Message)
{
    if (State == EKeylightState::Licensed)
    {
        // Signed lease stored locally — game proceeds
        UnlockContent();
    }
    else
    {
        ShowLicensePrompt();
    }
}

Gate content from Blueprints

UKeylightSubsystem is fully Blueprint-callable. Wire up your activation UI without touching C++:

[Event BeginPlay]
    → [Get Keylight Subsystem]
    → [Has Entitlement] ("pro")
    → [Branch]
        True  → [Unlock Pro Content]
        False → [Show License Prompt]

For gating specific premium content — a DLC chapter, an expansion map, a bonus character — call HasEntitlement("pro") (or whatever entitlement label you configure in your Keylight dashboard) anywhere in your Blueprint graph. The check reads from the cached, signature-verified lease, so it works offline.

States

The subsystem resolves one of four states:

StateMeaning
LicensedValid signed lease on disk
TrialWithin the trial window
ExpiredLease expired, needs renewal
InvalidNo valid lease — show activation prompt

The offline path in detail

After the first activation, the server returns an Ed25519-signed lease payload. The subsystem persists this to local storage using Unreal’s FPlatformMisc::GetProjectDir() path. On every subsequent launch, it loads the lease and calls the Ed25519 verifier against the bundled public key — the check is a fast local operation with no network dependency.

Background revalidation runs periodically when connectivity is available, refreshing the lease and propagating any revocations. A revoked key only transitions to Invalid after the next successful revalidation contact — a session already in progress is never interrupted.

Getting started

Create a Keylight account, connect your Stripe account, and configure your game as a product. Drop the plugin into Plugins/, configure UKeylightSubsystem with your tenant, product, and SDK key, and add the activation call to your first-launch flow.

Keylight handles the Stripe webhook on its end — when a player completes checkout, Keylight mints and signs the lease and sends the key by email automatically.

Keylight plans start at $19/month on the pricing page. The free tier supports up to five licenses — enough to test the complete flow end to end before your game ships.

The hardest part of direct licensing is not the cryptography. It is the operational layer: the dashboard, the email, the Stripe wiring, the customer portal. Using a purpose-built licensing backend means you spend your development time on your game, not on infrastructure that has to keep running forever after you ship.

Frequently asked

Can I license an Unreal Engine game today?+

Yes. The Keylight C++ plugin ships as Unreal source you drop into your Plugins/ directory. It exposes UKeylightSubsystem, which is callable from both C++ and Blueprints — activate a key, check entitlements, and verify tamper-proof offline leases without any backend you maintain.

Do I need to run a server?+

No. UKeylightSubsystem calls api.keylight.dev directly. Keylight mints, signs, tracks, and revokes licenses. Your game only holds the public key needed to verify leases locally.

How does offline verification work?+

At activation the server returns an Ed25519-signed lease. Your game stores it and verifies the signature locally at every subsequent launch — no network call needed. Online revalidation happens in the background when connectivity is available, so revocations propagate without interrupting a session.

Start licensing your app today

Drop in the Swift SDK, point it at your dashboard, and sell paid apps in under a minute. Free forever tier included.

Start Free