SubsystemAuthoring¶
3 tools for external subsystems: listing, activating and deactivating them.
Back to the index.
activate_external_subsystem¶
Destructive
Externally activate a Blueprint-authored USubsystem via FSubsystemCollectionBase::ActivateExternalSubsystem: every live collection of its family (engine, editor, game instance, world or local player) creates and initializes an instance, unless the class's ShouldCreateSubsystem declines. Refuses to toggle native / abstract / base classes. The engine call reports nothing, so the instances the collections hold are counted before and after it: activated is true when at least one is held afterwards, already_active when one was held before (a repeat call adds nothing), and success is false when none is held. Inverse: deactivate_external_subsystem.
| Parameter | Type | Required | Description |
|---|---|---|---|
class_name |
string | yes | Short class name or /Script/ path of a Blueprint-derived USubsystem |
Returns: { class_name: string, lifetime: string, instances_before: int, instances_after: int, activated: bool, already_active: bool } -- for a subsystem of another family than those five, activated is null with a note and no counts.
deactivate_external_subsystem¶
Destructive Idempotent
Tear down a Blueprint-authored subsystem (a non-native, non-abstract USubsystem class) in every live subsystem collection of its family (engine, editor, game instance, world or local player), through the engine's external-subsystem switch: its Deinitialize runs and its runtime state is lost. Runtime only: nothing is saved and there is no undo, and a world or game instance created later builds it again. The inverse is activate_external_subsystem; check what is live with list_subsystem_instances (with class_name it answers active true or false), and find candidate classes with list_derived_classes. Native engine subsystems, the subsystem base classes and abstract classes are refused, since tearing them down can crash the editor; a class that is not found or is not a subsystem is an error. Idempotent: a repeat call, or one for a subsystem that is not active, changes nothing and answers deactivated false with a note. The engine call reports nothing, so the instances the collections hold are counted before and after it: deactivated is true when some were held and none are left, and success is false if any is still held.
| Parameter | Type | Required | Description |
|---|---|---|---|
class_name |
string | yes | Blueprint subsystem class, by its Blueprint asset path (e.g. "/Game/Systems/BP_ScoreSubsystem"), generated class path, or loaded generated class name (e.g. "BP_ScoreSubsystem_C"); a native /Script/ class resolves but is refused. |
Returns: { class_name: string, lifetime: string, instances_before: int, instances_after: int, deactivated: bool, note? } -- for a subsystem of another family than those five, deactivated is null with a note and no counts.
list_subsystem_instances¶
Read-only
Enumerate the USubsystem instances live right now, with each one's class path and lifetime (class default objects are skipped); with class_name it answers the yes/no question for ONE class instead -- active is whether that class (or a subclass) has any live instance, across every lifetime. A LocalPlayer subsystem only exists while a PIE session has a local player, so a headless editor lists Engine / Editor / GameInstance / World ones; list_local_player_subsystems reads a PIE player's.
| Parameter | Type | Required | Description |
|---|---|---|---|
lifetime |
string | no | Optional filter: "Engine"|"Editor"|"GameInstance"|"World"|"LocalPlayer" (case-insensitive) |
class_name |
string | no | Optional USubsystem class (short name or /Script/ path): keep only the instances of that class or a subclass. A name that does not resolve to a USubsystem class is an error. |
offset |
integer | no | Index of the first entry returned, counted from 0 (default 0). Read the next page at the reply's next_offset. |
limit |
integer | no | Most entries returned per call, 1..1000 (default 100). |
Returns: { total: int, instance_count: int, active: bool, lifetime_filter?, class_name?, lifetime?, instances:[{ class_name, class_path, lifetime, instance_name, instance_path }] (sorted by instance_path, paged with offset/limit), offset: int, limit: int, returned: int, truncated: bool, next_offset: int|null } -- total and instance_count are the same number, every match before the page cut, and active is total > 0; class_name and lifetime (the class's own lifetime category) appear when class_name was given.