MindAttic/Unreal.Shared
Library

Unreal.Shared.

Run the real Unreal game with no window, on cue.

Unreal.Shared is the plugin every MindAttic Unreal game enables for an off-by-default --headless mode: no window, muted, and one log line that tells a script the game is ready to drive.

Stable C++ 20 Unreal Engine 5.8 PowerShell

What it is

Automated testing for the game you actually ship

Scripted tests are most useful when they run the real game, not a stripped-down test map. Unreal.Shared gives every MindAttic Unreal game one way to do that: launch with --headless or MINDATTIC_HEADLESS=1, and the game starts with no window, no splash and no sound, then writes exactly one MINDATTIC_HEADLESS_READY <ProjectName> line once the first map is loaded.

Off means off. Without the switch the plugin adds no flags, writes no log lines and changes nothing, so it is safe to leave enabled in every build.

Adoption is two entries in a .uproject. Nothing is copied into the game, and a game only touches the C++ API if it wants its own opt-ins, such as skipping the main menu, bound to one delegate.

The details are measured, not guessed. The README records which engine flags a plugin can still apply from EarliestPossible on UE 5.8 and which ones need the real command line, and the bundled launcher passes exactly those.

Who it's for

  • Unreal developersGet a reliable headless launch mode for any game without writing engine start-up code yourself.
  • CI and test engineersStart the game, wait on one log line, drive it, read the log, and stop it, from PowerShell.
  • Teams with Unity and Unreal gamesUse the same switch and the same ready line in both engines, matched by Unity.Shared.

Features

What you get

01

One switch

--headless or -headless (any case, as a whole argument) or MINDATTIC_HEADLESS=1, resolved once from the command line and environment.

02

No window from the switch alone

The MindAtticHeadless module loads at EarliestPossible and adds -RenderOffScreen and -nosplash early enough for the splash, RHI and Slate to obey them.

03

A ready line scripts can trust

Exactly one MINDATTIC_HEADLESS_READY <ProjectName> message, written after the engine loop finishes initialising and the first map is loaded.

04

Game hooks

FMindAtticHeadless::IsActive() and the OnReady() delegate let a game add its own headless behaviour; HasSignalledReady() covers late callers.

05

A launcher that fills the gaps

tools/Start-Headless.ps1 runs a .uproject with -game or a built exe, adds -unattended -nosound, prints the log path and can wait for the ready line.

06

Frames still render

-RenderOffScreen keeps screenshots and frame read-back working; pass -NullRhi when you want no GPU work at all.

07

Test overrides

SetActiveOverride and ClearActiveOverride force the switch in tests, and IsRequested exposes the rule with no side effects.

08

Proven with real launches

A host project harness builds the plugin with UE 5.8 and launches it off, with the flag, with the variable and through the launcher, checking that no window ever opens.

How it works

From plugin to scripted run

  1. Clone it beside your game

    The plugin is consumed from source, next to the game's repo.

  2. Enable it in the .uproject

    Add MindAtticShared to Plugins and the plugin folder to AdditionalPluginDirectories.

  3. Launch headless

    Run Start-Headless.ps1 -Project <game>.uproject -Wait or pass --headless yourself.

  4. Drive and query

    Once the ready line appears, the first map is up and your script takes over.

Quick start

Run a game headless

With Unreal.Shared cloned next to the game and the plugin enabled in its .uproject:

The full setup guide lives in the documentation.

powershell
> ..\Unreal.Shared\tools\Start-Headless.ps1 -Project .\MyGame.uproject -Wait

Part of MindAttic

One piece of a bigger workshop

Unreal.Shared is enabled today by Unreal.Playground and SpaceGod.Unreal, among other MindAttic Unreal projects. It grows only when a second game would otherwise copy the same code.

Its Unity counterpart, Unity.Shared, follows the same headless contract, so one test script pattern covers both engines.

Status

Where it stands

Stable

Version 1.0 in use; closing out the release

The plugin, the launcher and the host-project harness are built and enabled by the MindAttic Unreal games. What remains is a bug hunt, a changelog with a verified consumer list, and the v1.0.0 tag.

Current milestone: Unreal.Shared 1.0 headless plugin.

Next step

Put your Unreal game under test

Guides, reference and design notes are in the searchable MindAttic documentation. The source, issues and history are on GitHub.