Jump to content

Unreal.Shared/BIBLE

From MindAttic Docs

Unreal.Shared — Project Bible

Single source of truth for what Unreal.Shared IS, is NOT, and the rules that keep it coherent. README says how to build and run it; this says how to think about it. The finish line lives in docs/RELEASE.md.

1. The one sentence

One Unreal plugin, MindAtticShared, holding the features every MindAttic Unreal game would otherwise copy; today that is the off-by-default --headless launch mode.

2. The product promise

  • One switch in every MindAttic game, Unity or Unreal: --headless or MINDATTIC_HEADLESS=1.
  • No window, muted, and exactly one MINDATTIC_HEADLESS_READY <ProjectName> log line once the first map is up.
  • Off by default: without the switch the plugin does nothing at all.
  • Adopted by editing the game's .uproject; nothing is copied into the game.

3. What it is NOT

  • Not a gameplay library: games keep their own opt-ins (skip menus, scripted input) in their own code.
  • Not a place for code only one game uses.
  • Not the Unity counterpart (that is Unity.Shared, which follows the same headless contract).

4. Architecture canon

Plugins/MindAtticShared/MindAtticShared.uplugin        VersionName 1.0
  Source/MindAtticHeadless/  (Runtime, LoadingPhase EarliestPossible, Core only)
    Public/MindAtticHeadless.h   FMindAtticHeadless: IsActive, OnReady, HasSignalledReady, overrides
    Private/MindAtticHeadless.cpp  the switch rule, the engine flags, the ready line
tools/Start-Headless.ps1      launch a .uproject (-game) or a built exe headless; wait for the ready line
tests/HostProject/            test-only host project that enables the plugin as a game does
tests/Run-HostProjectTests.ps1  builds the host and checks the contract with real launches

4.1 Domain model (the nouns)

The switch, the engine flags (-RenderOffScreen, -nosplash, -unattended, -nosound), the ready line, the consumer (a game .uproject).

4.2 Key services (the verbs)

  • FMindAtticHeadless::IsActive() resolves the switch once; OnReady() fires once before the ready line.
  • Start-Headless.ps1 supplies the flags a plugin cannot apply late enough (-unattended -nosound).

5. The Laws

Inherits MindAttic.HouseRules.md by reference.

  1. Off means off: without the switch, no flags, no log lines, no behaviour change.
  2. The ready line is written exactly once, after OnReady(), in a headless run only.
  3. The plugin never changes a game's menus or input.
  4. A module joins only when a second game would otherwise copy it.

6. Verified state

Measured on UE 5.8 with tests/HostProject (README, "The flags"): -RenderOffScreen and -nosplash take effect from the plugin alone; -unattended and -nosound need the real command line, which Start-Headless.ps1 passes. Consumers today are listed in docs/RELEASE.md §6.

7. Active frontier

docs/RELEASE.md: MS-17, plugin 1.0 bug-free, documented, consumers verified, v1.0.0 tagged.

8. Quality bar

A change is done when HostProjectEditor builds clean, the README contract still describes the behaviour, and its commit names its ticket. The host-project harness runs on the owner's /test.

9. Glossary

  • Ready line: the single MINDATTIC_HEADLESS_READY <ProjectName> log message.
  • Consumer: a game .uproject that enables MindAtticShared.
Part of Unreal.Shared.
From Unreal.Shared/docs/BIBLE.md via MindAttic.Docs; synced automatically, so edit the repo, not this page.