Logo: Ue Subsystems

Ue Subsystems

Communautéit
kevinpbuckley
ue-subsystems

Implement engine-managed singletons scoped to a defined lifetime using Unreal's Subsystem framework — UEngineSubsystem, UGameInstanceSubsystem, UWorldSubsystem, UTickableWorldSubsystem, and ULocalPlayerSubsystem. Covers Initialize/Deinitialize lifecycle, ShouldCreateSubsystem for conditional creation, InitializeDependency for ordered init, and Blueprint/Python exposure. Use when building a service or manager (save system, ability registry, match service, analytics) and deciding whether to scope it to the process, game session, world, or local player — and when choosing between a subsystem, a manager actor, or a GameInstance override.

Iwwersiicht

Editeurkevinpbuckley
Repositoryunreal-engine-skills
Skill-Nummue-subsystems
Stären
89
Forks
9
Matgeliwwert Dateien
3
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • 3 matgeliwwert Dateien

    Skripten, Virlagen a Referenzen, déi de Modell beim Schaffe liese kann. D'Dateie kënnen nëmme gelies ginn a ginn ni ausgeféiert.

  • Open Source

    kevinpbuckley huet de Skill op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Ue Subsystems an TypingMind, fir e mat all LLM ze benotzen, oder setzt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vu GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier, déi hei drënner steet, an a bestätegt d'Installatioun.
    https://github.com/kevinpbuckley/unreal-engine-skills/tree/master/skills/core/ue-subsystems
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill derbäisetzen → Iwwer eng GitHub-URL. Pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an d'Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/kevinpbuckley/unreal-engine-skills.git /tmp/unreal-engine-skills
mkdir -p .claude/skills
cp -r /tmp/unreal-engine-skills/skills/core/ue-subsystems .claude/skills/ue-subsystems
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Ue Subsystems an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Ue Subsystems automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Ue Subsystems net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Schlësselen.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

Subsystems

A Subsystem is a UObject-derived singleton whose lifetime matches a specific engine construct (engine process, game instance, world, or local player). The engine creates it automatically when the owning object is created and destroys it when the owner is torn down — no manual instancing, no GC juggling, and Blueprint/Python exposure comes for free.

Subsystems replace hand-rolled static singletons and "manager actors". They are the canonical pattern for cross-cutting services in modern Unreal C++.

When to use this skill

  • You need a service or manager class (inventory, save system, match lifecycle, analytics, ability registry, audio coordinator) and want it created and cleaned up automatically.
  • You need to choose between a UGameInstanceSubsystem, UWorldSubsystem, or a manager actor.
  • You are building a plugin and want the plugin's systems initialized without burdening the game project with manual setup code.
  • You want Blueprint-callable game services without casting to game-specific classes.
  • You want per-local-player state that is split-screen-safe.

The five subsystem types (choose by lifetime)

Base classLifetimeCreated/owned byAccess
UEngineSubsystemEngine process; survives level loads and PIE sessionsUEngine / GEngineGEngine->GetEngineSubsystem<T>()
UGameInstanceSubsystemGame session; persists across level loadsUGameInstanceGameInstance->GetSubsystem<T>()
UWorldSubsystemOne UWorld; reset on every level change or seamless travelUWorldWorld->GetSubsystem<T>()
UTickableWorldSubsystemSame as UWorldSubsystem plus automatic per-frame TickUWorldWorld->GetSubsystem<T>()
ULocalPlayerSubsystemOne local player; one instance per split-screen slotULocalPlayerLocalPlayer->GetSubsystem<T>()

UEditorSubsystem (editor-only module) follows the same pattern for editor tooling; it is not covered here. See references/subsystem-types.md for full per-type detail.

Authoring a subsystem

A minimal UGameInstanceSubsystem:

cpp
// MySaveSubsystem.h
#pragma once
#include "Subsystems/GameInstanceSubsystem.h"
#include "MySaveSubsystem.generated.h"

UCLASS()
class MYGAME_API UMySaveSubsystem : public UGameInstanceSubsystem
{
    GENERATED_BODY()
public:
    // Called after UGameInstance is initialized. Collection is used to declare dependencies.
    virtual void Initialize(FSubsystemCollectionBase& Collection) override;
    virtual void Deinitialize() override;

    // Returns false to skip creation entirely (e.g. on dedicated server).
    virtual bool ShouldCreateSubsystem(UObject* Outer) const override;

    UFUNCTION(BlueprintCallable, Category = "Save")
    void SaveProfile();

private:
    UPROPERTY()
    TObjectPtr<USaveGame> CurrentSave;
};
cpp
// MySaveSubsystem.cpp
#include "MySaveSubsystem.h"
#include "AnotherSubsystem.h"   // dependency example

void UMySaveSubsystem::Initialize(FSubsystemCollectionBase& Collection)
{
    // Ensure UAnotherSubsystem is initialized before this one.
    Collection.InitializeDependency<UAnotherSubsystem>();
    Super::Initialize(Collection);
    // Perform initialization — world is not guaranteed here for game-instance scope.
}

void UMySaveSubsystem::Deinitialize()
{
    // Clear timers, delegates, file handles, etc.
    Super::Deinitialize();
}

bool UMySaveSubsystem::ShouldCreateSubsystem(UObject* Outer) const
{
    // Skip on dedicated server builds:
    if (!Super::ShouldCreateSubsystem(Outer)) { return false; }
    return !IsRunningDedicatedServer();
}

Key rules:

  • Initialize/Deinitialize are the lifecycle hooks — not BeginPlay/EndPlay.
  • The subsystem is a UObject; use UPROPERTY() on all UObject* members.
  • ShouldCreateSubsystem is called on the CDO before any instance is created; keep it cheap.
  • Call Super::Initialize(Collection) first, Super::Deinitialize() last.

Accessing a subsystem

cpp
// From any actor — GameInstance subsystem:
if (UGameInstance* GI = GetGameInstance())
{
    if (UMySaveSubsystem* Save = GI->GetSubsystem<UMySaveSubsystem>())
        Save->SaveProfile();
}

// Static helper — safe even if GI is null:
UMySaveSubsystem* Save = UGameInstance::GetSubsystem<UMySaveSubsystem>(GetGameInstance());

// World subsystem (returns null if ShouldCreateSubsystem returned false):
UMyWorldSub* WS = GetWorld()->GetSubsystem<UMyWorldSub>();

// Checked accessor (asserts on null; prefer when null is a bug):
UMyWorldSub& WS = *GetWorld()->GetSubsystemChecked<UMyWorldSub>();

// Local player subsystem from a PlayerController:
UMyLPSub* S = ULocalPlayer::GetSubsystemFromController<UMyLPSub>(this);

In Blueprints, subsystems appear as typed auto-context getter nodes — no casting required. The node is available for any subsystem that is a UCLASS() (even without BlueprintType), as long as the function is marked BlueprintCallable. USubsystemBlueprintLibrary provides the static getters that Blueprint graph searches surface.

Dependency ordering

cpp
void UMySubsystem::Initialize(FSubsystemCollectionBase& Collection)
{
    // Template form — preferred, type-safe:
    Collection.InitializeDependency<UOtherSubsystem>();
    Super::Initialize(Collection);
}

InitializeDependency only works within the same collection (same owner). You cannot declare a UWorldSubsystem dependency on a UGameInstanceSubsystem — they live in separate collections. See references/lifecycle-and-access.md for the full initialization sequence.

Ticking — UTickableWorldSubsystem

When per-frame work is needed in a world-scoped subsystem, inherit from UTickableWorldSubsystem instead of UWorldSubsystem:

cpp
UCLASS()
class MYGAME_API UMyTickingSystem : public UTickableWorldSubsystem
{
    GENERATED_BODY()
public:
    virtual void Initialize(FSubsystemCollectionBase& Collection) override;
    virtual void Deinitialize() override;
    virtual void Tick(float DeltaTime) override;

    // Required pure virtual — used by the stats system:
    virtual TStatId GetStatId() const override
    {
        RETURN_QUICK_DECLARE_CYCLE_STAT(UMyTickingSystem, STATGROUP_Tickables);
    }
};

Rules:

  • Forward Initialize/Deinitialize to Super to enable/disable ticking correctly.
  • GetStatId is a pure virtual — failing to implement it prevents compilation.
  • Prefer timers (ue-timers-and-async) over ticking when the work is infrequent.

Choosing subsystem vs alternatives

NeedRecommendation
Stateless utility functionsFree functions or a BlueprintFunctionLibrary
Replicated state (HP, score)AGameState, APlayerState (subsystems do not replicate)
Single placed world object (obstacle spawner)Manager actor placed in the level
Per-actor behavior/dataComponent on the actor
Cross-level session stateUGameInstanceSubsystem
Per-level state, reset on travelUWorldSubsystem
Per-player UI/input stateULocalPlayerSubsystem
Plugin initializationUEngineSubsystem or UGameInstanceSubsystem

Subsystems do not replicate. Keep authoritative networked state on GameState, PlayerState, or replicated actors. Use subsystems on the local side for coordination, caching, and UI logic. See ue-networking-and-replication and ue-gameplay-framework.

Gotchas

  • No world access in GameInstance/Engine Initialize — GetWorld() on a UGameInstanceSubsystem returns null during Initialize; use a UWorldSubsystem or defer world-dependent work to OnWorldBeginPlay (world subsystems) or a timer.
  • Wrong scope — session-persistent data in a UWorldSubsystem is wiped on level change; per-level data in a UGameInstanceSubsystem accumulates across travels.
  • ShouldCreateSubsystem returns false, but caller doesn't null-check — GetSubsystem<T> returns nullptr when the subsystem was skipped; always null-check in the caller.
  • Dependency across collections — InitializeDependency only works within the same collection; cross-scope coordination needs an accessor call in Initialize.
  • Forgetting Super in Initialize/Deinitialize — for UTickableWorldSubsystem, Super::Initialize starts ticking and Super::Deinitialize stops it; skipping them breaks the tick lifecycle.
  • Heavy work in Initialize blocking startup — defer expensive loading via FStreamableManager or AsyncTask (see ue-timers-and-async).
  • Circular dependencies — InitializeDependency detects simple cycles at runtime and asserts; avoid mutual dependencies by splitting shared state into a third subsystem.

References & source material

Engine source (UE 5.8, Engine/Source/Runtime/Engine/Public/Subsystems/):

  • Subsystem.h — USubsystem:44 — ShouldCreateSubsystem:56, Initialize:59, Deinitialize:62. UDynamicSubsystem:80 (base for UEngineSubsystem).
  • SubsystemCollection.h — FSubsystemCollectionBase:16, InitializeDependency:35, ActivateExternalSubsystem:50, DeactivateExternalSubsystem:55.
  • GameInstanceSubsystem.h — UGameInstanceSubsystem:16 (Within=GameInstance), GetGameInstance():25.
  • WorldSubsystem.h — UWorldSubsystem:16 — PostInitialize:37, OnWorldBeginPlay:43, DoesSupportWorldType:66. UTickableWorldSubsystem:80 — GetStatId pure virtual:92.
  • LocalPlayerSubsystem.h — ULocalPlayerSubsystem:17 (Within=LocalPlayer), PlayerControllerChanged:35.
  • EngineSubsystem.h — UEngineSubsystem:20 (derives from UDynamicSubsystem).
  • SubsystemBlueprintLibrary.h — Blueprint-internal getters for all subsystem types:15.

Engine source (UE 5.8, Engine/Source/Runtime/Engine/Classes/Engine/):

  • GameInstance.h — GetSubsystem<T>():440, static GetSubsystem(GameInstance*):450.
  • World.h — GetSubsystem<T>():4312, GetSubsystemChecked<T>():4321, static GetSubsystem(World*):4331.
  • LocalPlayer.h — GetSubsystem<T>():365, GetSubsystemFromController<T>():389.
  • Engine.h — GetEngineSubsystem<T>():3847, EngineSubsystemCollection:3877.

Official docs (UE 5.8):

Deep-dive references in this skill:

  • references/subsystem-types.md — per-type detail: creation timing, valid GetWorld() availability, DoesSupportWorldType, dynamic subsystems, UEditorSubsystem.
  • references/lifecycle-and-access.md — full Initialize/Deinitialize sequence, dependency ordering, accessing subsystems from C++ and Blueprints, collection internals.
  • references/choosing-a-subsystem.md — decision guide: subsystem vs manager actor vs GameInstance override vs component; networking constraints; plugin patterns.

Matgeliwwert Dateien

De Modell liest dës Dateie bei Bedarf, wärend de Skill gelueden ass. Si ginn als liesbar Dateie bereetgestallt a ginn ni ausgeféiert.

Heefeg gestallte Froen

Wat mécht de KI-Skill Ue Subsystems?

Implement engine-managed singletons scoped to a defined lifetime using Unreal's Subsystem framework — UEngineSubsystem, UGameInstanceSubsystem, UWorldSubsystem, UTickableWorldSubsystem, and ULocalPlayerSubsystem. Covers Initialize/Deinitialize lifecycle, ShouldCreateSubsystem for conditional creation, InitializeDependency for ordered init, and Blueprint/Python exposure. Use when building a service or manager (save system, ability registry, match service, analytics) and deciding whether to scope it to the process, game session, world, or local player — and when choosing between a subsystem,...

Firwat Ue Subsystems op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Ue Subsystems besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt, amplaz en Abonnement pro Benotzerplaz ze bezuelen. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Ue Subsystems an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/kevinpbuckley/unreal-engine-skills/tree/master/skills/core/ue-subsystems an. TypingMind liest d'Datei SKILL.md, bëndelt déi zougehéiereg Dateien an installéiert dat Ganzt als Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Ue Subsystems benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Ue Subsystems benotzen?

Esou vill wéi Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Ue Subsystems domat benotzen – zum Beispill mat GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Ue Subsystems gratis?

kevinpbuckley huet de Skill op GitHub publizéiert. Kuckt am Repository no de Lizenzbedéngungen. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbare Pak vun Instruktiounen, deen engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt e maache soll a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a kee Lafzäitëmfeld a funktionéiere mat all Modell.

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇