Logo di Ue Subsystems

Ue Subsystems

Community
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.

Panoramica

Pubblicato dakevinpbuckley
Repositoryunreal-engine-skills
Nome della skillue-subsystems
Stelle
89
Fork
9
File inclusi
3
Link
  • Istruzioni in Markdown

    Un file SKILL.md che il modello carica quando serve, consumando token solo quando una richiesta è effettivamente pertinente.

  • Funziona con qualsiasi LLM

    Le skill IA sono in semplice Markdown, non in codice specifico di un fornitore, quindi funzionano con GPT, Claude, Gemini, Grok o un modello locale.

  • File inclusi: 3

    Script, template e riferimenti che il modello può leggere mentre lavora. I file sono di sola lettura e non vengono mai eseguiti.

  • Open source

    Pubblicata da kevinpbuckley su GitHub. Leggi i sorgenti prima di installarla.

Installazione

Installa la skill IA Ue Subsystems in TypingMind per usarla con qualsiasi LLM, oppure copiala in un altro agente in grado di leggere SKILL.md.

1

Installa in TypingMind

TypingMind installa una skill direttamente dalla sua cartella GitHub: legge SKILL.md, raccoglie i file delle risorse e salva il risultato in locale.

  1. Apri l'app e vai su Plugin → Skill.
  2. Scegli "Installa da GitHub".
  3. Incolla l'URL della cartella della skill riportato qui sotto e conferma.
    https://github.com/kevinpbuckley/unreal-engine-skills/tree/master/skills/core/ue-subsystems
  4. Attiva la skill in ogni chat in cui vuoi averla a disposizione.
Plugin → Skill → Aggiungi skill → Da URL GitHub, poi incolla l'URL della cartella e premi Continua.
2

Installa in un altro agente

Qualsiasi agente che legge il formato Agent Skills può usare questa skill: copia la cartella della skill nella directory delle skill di quell'agente.

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
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva Ue Subsystems in qualsiasi chat di TypingMind e al resto pensa il modello. Il nome e la descrizione della skill sono nel prompt di sistema e, non appena arriva una richiesta pertinente, il modello carica da solo le istruzioni complete: non devi mai richiamarla manualmente e non consuma token finché non viene effettivamente usata.

Il modello carica automaticamente Ue Subsystems non appena riceve una richiesta pertinente.

Funziona con qualsiasi modello IA

Le skill IA sono semplici istruzioni in Markdown, non codice specifico di un fornitore, quindi Ue Subsystems non è vincolata al modello per cui è stata scritta. Installala una sola volta in TypingMind e usala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modello locale che esegui tu, sempre con le tue chiavi API.

  • Caricata solo quando serve

    Il prompt di sistema contiene solo il nome e la descrizione. Le istruzioni vengono recuperate alla prima richiesta pertinente, quindi una skill inutilizzata non costa nulla.

  • Cambia modello durante la chat

    Poiché la skill è composta da istruzioni e non da codice, continua a funzionare anche se cambi modello: il nuovo modello legge lo stesso file SKILL.md.

Istruzioni della skill

Questo è il contenuto di SKILL.md che il modello carica. Leggilo prima dell'installazione: una skill è un insieme di istruzioni che il tuo modello seguirà.

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.

File inclusi

Il modello legge questi file quando servono, mentre la skill è caricata. Sono accessibili in sola lettura e non vengono mai eseguiti.

Domande frequenti

Cosa fa la skill IA 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,...

Perché usare Ue Subsystems su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. Ue Subsystems è scritta in semplice Markdown anziché in codice specifico di un fornitore, quindi la stessa skill funziona con GPT-5, Claude, Gemini, Grok o un modello locale, e puoi cambiare modello durante la chat senza che la skill smetta di funzionare. TypingMind usa le tue chiavi API, quindi paghi direttamente i fornitori anziché un abbonamento per posto utente, e le tue skill e chat restano nel tuo spazio di archiviazione.

Come installo Ue Subsystems in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/kevinpbuckley/unreal-engine-skills/tree/master/skills/core/ue-subsystems. TypingMind legge il file SKILL.md, include i file associati e installa la skill, che puoi abilitare per ogni singola chat.

Quali modelli IA possono usare Ue Subsystems?

Qualsiasi modello che colleghi a TypingMind. Le skill IA sono semplici istruzioni in Markdown anziché codice specifico di un fornitore, quindi GPT, Claude, Gemini, Grok e i modelli locali possono tutti caricare questa skill quando una richiesta corrisponde al suo scopo.

Quanti modelli IA posso usare con Ue Subsystems?

Quanti ne vuoi. Se un modello supporta le skill, puoi usarlo con Ue Subsystems: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e molti altri, tutti su TypingMind con le tue chiavi API.

La skill IA Ue Subsystems è gratuita?

È pubblicata su GitHub da kevinpbuckley. Consulta il repository per i termini di licenza. Paghi solo il tuo fornitore IA per i token che usi.

Cosa sono le skill IA?

Una skill IA è un pacchetto di istruzioni riutilizzabili che insegna a un modello IA come svolgere un'attività specifica. Segue il formato aperto Agent Skills: un file SKILL.md con un nome e una descrizione, più eventuali script, template o file di riferimento di cui il modello potrebbe aver bisogno. Il modello legge le istruzioni solo quando la tua richiesta corrisponde alla skill, quindi una skill installata non comporta costi finché non viene usata.

In cosa si differenziano le skill IA dai plugin o dai server MCP?

Un plugin o un server MCP fornisce a un modello nuovi strumenti da richiamare: codice che viene eseguito da qualche parte e restituisce un risultato. Una skill IA, invece, fornisce al modello conoscenze e procedure: come affrontare un'attività, quali passaggi seguire e quali caratteristiche deve avere un buon output. Le skill sono semplici istruzioni in Markdown, quindi non richiedono server, chiavi API né ambienti di esecuzione e funzionano con qualsiasi modello.

Elenco completo

Crea subito il tuo spazio di lavoro AI

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇