UGantryExperienceStage_GameFeatures
Loads and activates game feature plugins, reference counted across experience swaps.
Add it to an experience's Stages and list the plugins by name in Game Feature Plugin Names. The stage finishes only when every plugin is active and every Gantry game feature action they run (UGantryGameFeatureAction) has finished its work, so a loading screen stays up until the world is assembled.
Shared plugins
Two experiences can use the same plugin, such as props shared by two game modes. Gantry counts who holds each plugin, so switching from one experience to the other keeps the shared plugin active. A plugin is switched off only when no running experience holds it.
On 5.6 and 5.7, a plugin's own dependencies stay loaded after it is released, until the engine unloads them. On 5.8 and later the engine tracks and releases them as well.
- Inherits
UGantryExperienceStage
Properties
| Property | Type | Default | Description |
|---|---|---|---|
GameFeaturePluginNames read-only | TArray<FString> | Game feature plugins to activate, by name not URL; each resolves when the stage runs. | |
bDeactivateOnEnd read-only | bool | True | Release this stage's hold on its plugins when the experience ends. Releasing does not force a plugin off: one that another experience still holds stays active. Turn this off only for a plugin that must stay active for as long as the game runs, after every experience has ended. |
ActivatedPluginURLs | TArray<FString> | Plugins this stage activated, recorded on every engine. On 5.6 / 5.7 these are the references this stage holds in Gantry's process-wide counts, and teardown releases exactly these. On 5.8+ they back the handle. FGameFeatureStateHandle is gated behind GameFeatureStateHandle.Enabled, which the engine describes as "a quick way for now to disable and fallback to how things are now". If that CVar is off, InitAndRegister leaves the handle invalid and releasing it would silently free nothing, leaking every plugin an experience ever activated. So teardown falls back to direct deactivation of these URLs, unreference counted, which is the behaviour the CVar asked for. |
C++
Public C++ members that Blueprint does not see.
GetStageDisplayName_Implementation
virtual FString
Returns "Activating features".
GetStageTag_Implementation
virtual FGameplayTag
Returns Gantry.Experience.Stage.GameFeatures.
BeginStage
virtual void
Resolves each plugin name, activates them as one reference-counted batch, then waits for outstanding UGantryGameFeatureAction work.
A name that does not resolve, or a plugin that fails to activate, fails the stage once the rest have settled.
EndStage
virtual void
Releases this stage's plugin references when bDeactivateOnEnd is set.
IsDataValid
virtual EDataValidationResult
Every plugin name must name a game feature plugin this project has.