EngineSubsystem Initialization and Kernel Sovereignty Locking
sequenceDiagram
participant E as Unreal Engine
participant SUB as LiteRtLmSubsystem
participant PL as Plugin Wrapper
E->>SUB: 1. Initialize(Collection)
activate SUB
SUB->>PL: 2. Attempt Dynamic Binding to DLL Symbols
PL-->>SUB: 3. Return Handle to DLL
SUB->>SUB: 4. Initialize Global ModelHandle State
deactivate SUB
Note over E, SUB: Subsystem enters Ready state (Singleton Locked)
Local LLM loading involves physical VRAM locking. If multiple Actors reload the model, memory will overflow instantly.
The plugin ensures only one EngineHandle exists per engine lifecycle. Multiple NPCs share the same physical inference instance.
Once loaded into the subsystem, the VRAM footprint is preserved across OpenLevel transitions, avoiding redundant AI warm-up times.
How business logic securely acquires authority:
// 1. Acquire singleton handle
ULiteRtLmSubsystem* Subsystem = GEngine->GetEngineSubsystem<ULiteRtLmSubsystem>();
// 2. Query kernel sovereignty
if (Subsystem && Subsystem->IsModelLoaded()) {
// Model is physically locked, proceed to session ops
void* MySession = Subsystem->GetOrCreateSession(this);
}