Navigation
API > API/Plugins > API/Plugins/GameFeatures
The manager subsystem for game features
| Name | UGameFeaturesSubsystem |
| Type | class |
| Header File | /Engine/Plugins/Runtime/GameFeatures/Source/GameFeatures/Public/GameFeaturesSubsystem.h |
| Include Path | #include "GameFeaturesSubsystem.h" |
Syntax
UCLASS (MinimalAPI)
class UGameFeaturesSubsystem : public UEngineSubsystem
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → USubsystem → UDynamicSubsystem → UEngineSubsystem → UGameFeaturesSubsystem
Structs
| Name | Remarks |
|---|---|
| FCachedGameFeaturePluginDetails | |
| FGameFeatureBatchProcessingFence | Active fences |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FBuiltInPluginAdditionalFilters | TFunctionRef< bool(const FString &PluginFilename, const FGameFeaturePluginDetails &Details, FBuiltInGameFeaturePluginBehaviorOptions &OutOptions)> | GameFeaturesSubsystem.h | |
| FBuiltInPluginAdditionalFilters_Copyable | TFunction< bool(const FString &PluginFilename, const FGameFeaturePluginDetails &Details, FBuiltInGameFeaturePluginBehaviorOptions &OutOptions)> | GameFeaturesSubsystem.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| BatchProcessingFences | TMap< EGameFeaturePluginState, FGameFeatureBatchProcessingFence > | GameFeaturesSubsystem.h | ||
| bInitializedPolicyManager | bool | GameFeaturesSubsystem.h | ||
| CachedGameFeaturePluginDetailsLock | FTransactionallySafeRWLock | GameFeaturesSubsystem.h | ||
| CachedPluginDetailsByFilename | TMap< FString, FCachedGameFeaturePluginDetails > | GameFeaturesSubsystem.h | ||
| DebugStateChangedForPlugins | TSet< FString > | GameFeaturesSubsystem.h | ||
| GameFeaturePluginNameToPathMap | TMap< FString, FString > | GameFeaturesSubsystem.h | ||
| GameFeaturePluginStateMachines | TMap< FString, TObjectPtr< UGameFeaturePluginStateMachine > > | The list of all game feature plugin state machine objects | GameFeaturesSubsystem.h |
|
| GameSpecificPolicies | TObjectPtr< UGameFeaturesProjectPolicies > | GameFeaturesSubsystem.h |
|
|
| GetExplanationForUnavailablePackageDelegateHandle | FDelegateHandle | GameFeaturesSubsystem.h | ||
| Observers | TArray< TObjectPtr< UObject > > | GameFeaturesSubsystem.h | ||
| OnPluginUnmountedDelegateHandle | FDelegateHandle | GameFeaturesSubsystem.h | ||
| RunningStateMachines | TArray< UGameFeaturePluginStateMachine * > | State machine currently in transition, used to limit search space when checking a batch processing fence or similar | GameFeaturesSubsystem.h | |
| TerminalGameFeaturePluginStateMachines | TArray< TObjectPtr< UGameFeaturePluginStateMachine > > | Game feature plugin state machine objects that are being terminated. | GameFeaturesSubsystem.h |
|
| TickHandle | FTSTicker::FDelegateHandle | The tick handle if currently registered for a tick | GameFeaturesSubsystem.h | |
| UnmountedPluginNameToExplanation | TMap< FString, FString > | When we decide not to mount a plugin, we can store an explanation here so that if we later attempt to load an asset from it we can tell the user why it's not available. | GameFeaturesSubsystem.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AddObserver
(
UObject* Observer |
GameFeaturesSubsystem.h | ||
void CancelGameFeatureStateChange
(
TConstArrayView< FString > PluginURLs, |
GameFeaturesSubsystem.h | ||
void CancelGameFeatureStateChange
(
const FString& PluginURL, |
GameFeaturesSubsystem.h | ||
void CancelGameFeatureStateChange
(
const FString& PluginURL |
Attempt to cancel any state change. | GameFeaturesSubsystem.h | |
void ChangeGameFeatureTargetState
(
const FString& PluginURL, |
Changes the target state of a game feature plugin | GameFeaturesSubsystem.h | |
void ChangeGameFeatureTargetState
(
TConstArrayView< FString > PluginURLs, |
GameFeaturesSubsystem.h | ||
void ChangeGameFeatureTargetState
(
const FString& PluginURL, |
GameFeaturesSubsystem.h | ||
void DeactivateGameFeaturePlugin
(
const FString& PluginURL |
Deactivates the specified plugin | GameFeaturesSubsystem.h | |
void DeactivateGameFeaturePlugin
(
const FString& PluginURL, |
GameFeaturesSubsystem.h | ||
bool DoesGameFeaturePluginNeedUpdate
(
const FString& PluginURL |
Determines if a plugin is up to date or needs an update. Returns true if an update is available. | GameFeaturesSubsystem.h | |
void FilterInactivePluginAssets
(
TArray< FAssetIdentifier >& AssetsToFilter |
Removes assets that are in plugins we know to be inactive. Order is not maintained. | GameFeaturesSubsystem.h | |
void FilterInactivePluginAssets
(
TArray< FAssetData >& AssetsToFilter |
Removes assets that are in plugins we know to be inactive. Order is not maintained. | GameFeaturesSubsystem.h | |
void ForEachActiveGameFeature
(
Func InFunc |
Calls the compile-time lambda on each active game feature data of the specified type | GameFeaturesSubsystem.h | |
void ForEachGameFeature
(
TFunctionRef< void(FGameFeatureInfo&&)> Visitor |
GameFeaturesSubsystem.h | ||
void ForEachRegisteredGameFeature
(
Func InFunc |
Calls the compile-time lambda on each registered game feature data of the specified type | GameFeaturesSubsystem.h | |
bool GetBuiltInGameFeaturePluginDetails
(
const TSharedRef< IPlugin >& Plugin, |
Gets relevant properties out of a uplugin file. Should only be used for built-in GFPs | GameFeaturesSubsystem.h | |
bool GetBuiltInGameFeaturePluginDetails
(
const TSharedRef< IPlugin >& Plugin, |
Gets relevant properties out of a uplugin file. Should only be used for built-in GFPs | GameFeaturesSubsystem.h | |
bool GetBuiltInGameFeaturePluginURL
(
const TSharedRef< IPlugin >& Plugin, |
Gets the URL for the given plugin, applying game-specific policies where appropriate. | GameFeaturesSubsystem.h | |
bool GetGameFeatureControlsUPlugin
(
const FString& PluginURL, |
Sets OutGameFeatureControlsUPlugin to true if the uplugin was added by a GFP as opposed to existing independent of the GFP subsystem. | GameFeaturesSubsystem.h | |
const UGameFeatureData * GetGameFeatureDataForActivePluginByURL
(
const FString& PluginURL |
Returns the game feature data for an active plugin specified by PluginURL | GameFeaturesSubsystem.h | |
void GetGameFeatureDataForActivePlugins
(
TArray< const UGameFeatureData* >& OutActivePluginFeatureDatas |
Returns all the active plugins GameFeatureDatas | GameFeaturesSubsystem.h | |
const UGameFeatureData * GetGameFeatureDataForRegisteredPluginByURL
(
const FString& PluginURL, |
Returns the game feature data for a registered plugin specified by PluginURL | GameFeaturesSubsystem.h | |
bool GetGameFeaturePluginDetails
(
const TSharedRef< IPlugin >& Plugin, |
Gets relevant properties out of a uplugin file | GameFeaturesSubsystem.h | |
bool GetGameFeaturePluginDetails
(
const FString& PluginURL, |
Gets relevant properties out of a uplugin file if it's installed | GameFeaturesSubsystem.h | |
bool GetGameFeaturePluginInstallPercent
(
TConstArrayView< FString > PluginURLs, |
GameFeaturesSubsystem.h | ||
bool GetGameFeaturePluginInstallPercent
(
const FString& PluginURL, |
Gets the Install_Percent for single game feature plugin if it is active. | GameFeaturesSubsystem.h | |
void GetLoadedGameFeaturePluginFilenamesForCooking
(
TArray< FString >& OutLoadedPluginFilenames |
Returns the list of plugin filenames that have progressed beyond installed. | GameFeaturesSubsystem.h | |
bool GetPluginDebugStateEnabled
(
const FString& PluginUrl |
GameFeaturesSubsystem.h | ||
FString GetPluginFilenameFromPluginURL
(
const FString& PluginURL |
Get the plugin path from the plugin URL | GameFeaturesSubsystem.h | |
EGameFeaturePluginState GetPluginState
(
const FString& PluginURL |
Returns the current state of the state machine for the specified plugin URL | GameFeaturesSubsystem.h | |
EGameFeaturePluginState GetPluginState
(
FGameFeaturePluginIdentifier PluginIdentifier |
Returns the current state of the state machine for the specified plugin PluginIdentifier | GameFeaturesSubsystem.h | |
bool GetPluginURLByName
(
FStringView PluginName, |
If the specified plugin is known by the game feature system, returns the URL used to identify it | GameFeaturesSubsystem.h | |
bool GetPluginURLForBuiltInPluginByName
(
const FString& PluginName, |
If the specified plugin is a built-in plugin, return the URL used to identify it. | GameFeaturesSubsystem.h | |
T & GetPolicy() |
Returns the game-specific policy for managing game feature plugins | GameFeaturesSubsystem.h | |
bool IsGameFeaturePluginActive
(
const FString& PluginURL, |
Determines if a plugin is in the Active state. | GameFeaturesSubsystem.h | |
bool IsGameFeaturePluginInstalled
(
const FString& PluginURL |
Determines if a plugin is in the Installed state (or beyond) | GameFeaturesSubsystem.h | |
bool IsGameFeaturePluginLoaded
(
const FString& PluginURL |
Determines if a plugin is in the Loaded state (or beyond) | GameFeaturesSubsystem.h | |
bool IsGameFeaturePluginMounted
(
const FString& PluginURL |
Determines if a plugin is beyond the Mounting state | GameFeaturesSubsystem.h | |
bool IsGameFeaturePluginRegistered
(
const FString& PluginURL, |
Determines if a plugin is in the Registered state (or beyond) | GameFeaturesSubsystem.h | |
void LoadAndActivateGameFeaturePlugin
(
TConstArrayView< FString > PluginURLs, |
GameFeaturesSubsystem.h | ||
void LoadAndActivateGameFeaturePlugin
(
const FString& PluginURL, |
GameFeaturesSubsystem.h | ||
void LoadAndActivateGameFeaturePlugin
(
const FString& PluginURL, |
Loads a single game feature plugin and activates it. | GameFeaturesSubsystem.h | |
void LoadBuiltInGameFeaturePlugin
(
const TSharedRef< IPlugin >& Plugin, |
Loads a built-in game feature plugin if it passes the specified filter | GameFeaturesSubsystem.h | |
void LoadBuiltInGameFeaturePlugins
(
FBuiltInPluginAdditionalFilters AdditionalFilter, |
Loads all built-in game feature plugins that pass the specified filters | GameFeaturesSubsystem.h | |
void LoadBuiltInGameFeaturePlugins_Amortized
(
const FBuiltInPluginAdditionalFilters_Copyable& AdditionalFilter_Copyable, |
Loads all built-in game feature plugins that pass the specified filters, split over multiple frames processing only AmortizeRate plugins per frame if greater than 0. | GameFeaturesSubsystem.h | |
void LoadGameFeaturePlugin
(
TConstArrayView< FString > PluginURLs, |
GameFeaturesSubsystem.h | ||
void LoadGameFeaturePlugin
(
const FString& PluginURL, |
GameFeaturesSubsystem.h | ||
void LoadGameFeaturePlugin
(
const FString& PluginURL, |
Loads a single game feature plugin. | GameFeaturesSubsystem.h | |
TSharedRef< FGameFeaturePluginPredownloadHandle > PredownloadGameFeaturePlugins
(
TConstArrayView< FString > PluginURLs, |
Pre-install any required game feature data, which can be useful for larger payloads. | GameFeaturesSubsystem.h | |
void RegisterGameFeaturePlugin
(
const FString& PluginURL, |
Registers a single game feature plugin. | GameFeaturesSubsystem.h | |
void RegisterGameFeaturePlugin
(
const FString& PluginURL, |
GameFeaturesSubsystem.h | ||
void RegisterGameFeaturePlugin
(
TConstArrayView< FString > PluginURLs, |
GameFeaturesSubsystem.h | ||
void ReleaseGameFeaturePlugin
(
const FString& PluginURL, |
GameFeaturesSubsystem.h | ||
void ReleaseGameFeaturePlugin
(
const FString& PluginURL |
Releases any game data stored for this GameFeaturePlugin. | GameFeaturesSubsystem.h | |
void RemoveObserver
(
UObject* Observer |
GameFeaturesSubsystem.h | ||
void SetPluginDebugStateEnabled
(
const FString& PluginUrl, |
GameFeaturesSubsystem.h | ||
void TerminateGameFeaturePlugin
(
const FString& PluginURL, |
GameFeaturesSubsystem.h | ||
void TerminateGameFeaturePlugin
(
const FString& PluginURL |
Terminate the GameFeaturePlugin and remove all associated plugin tracking data. | GameFeaturesSubsystem.h | |
void TerminateGameFeaturePlugin
(
TConstArrayView< FString > PluginURLs, |
GameFeaturesSubsystem.h | ||
void UninstallGameFeaturePlugin
(
const FString& PluginURL, |
Uninstalls any game data stored for this GameFeaturePlugin and terminates the GameFeaturePlugin. | GameFeaturesSubsystem.h | |
void UninstallGameFeaturePlugin
(
const FString& PluginURL, |
GameFeaturesSubsystem.h | ||
void UnloadGameFeaturePlugin
(
const FString& PluginURL, |
Unloads the specified game feature plugin. | GameFeaturesSubsystem.h | |
void UnloadGameFeaturePlugin
(
const FString& PluginURL, |
GameFeaturesSubsystem.h | ||
UE::GameFeatures::FResult UpdateGameFeatureProtocolOptions
(
const FString& PluginURL, |
Changes the protocol options of a game feature plugin. | GameFeaturesSubsystem.h | |
bool WasGameFeaturePluginLoadedAsBuiltIn
(
const FString& PluginURL |
Was this game feature plugin loaded using the LoadBuiltInGameFeaturePlugin path | GameFeaturesSubsystem.h |
Overridden from USubsystem
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void Deinitialize() |
GameFeaturesSubsystem.h | ||
virtual void Initialize
(
FSubsystemCollectionBase& Collection |
GameFeaturesSubsystem.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static void AddGameFeatureToAssetManager
(
const UGameFeatureData* GameFeatureToAdd, |
Scans for assets specified in the game feature data | GameFeaturesSubsystem.h | |
static EGameFeaturePluginState ConvertInitialFeatureStateToTargetState
(
EBuiltInAutoState InitialState |
GameFeaturesSubsystem.h | ||
static EBuiltInAutoState DetermineBuiltInInitialFeatureState
(
TSharedPtr< FJsonObject > Descriptor, |
Determine the initial feature state for a built-in plugin | GameFeaturesSubsystem.h | |
static void FixPluginPackagePath
(
FString& PathToFix, |
Fixes a package path/directory to either be relative to plugin root or not. | GameFeaturesSubsystem.h | |
static UGameFeaturesSubsystem & Get() |
GameFeaturesSubsystem.h | ||
static void GetPluginsToCook
(
TSet< FString >& OutPlugins |
Used during a DLC cook to determine which plugins should be cooked | GameFeaturesSubsystem.h | |
static FString GetPluginURL_FileProtocol
(
const FString& PluginDescriptorPath, |
GameFeaturesSubsystem.h | ||
static FString GetPluginURL_FileProtocol
(
const FString& PluginDescriptorPath |
Construct a 'file:' Plugin URL using from the PluginDescriptorPath | GameFeaturesSubsystem.h | |
static FString GetPluginURL_InstallBundleProtocol
(
const FString& PluginName, |
Construct a 'installbundle:' Plugin URL using from the PluginName and required install bundles | GameFeaturesSubsystem.h | |
static FString GetPluginURL_InstallBundleProtocol
(
const FString& PluginName, |
GameFeaturesSubsystem.h | ||
static FString GetPluginURL_InstallBundleProtocol
(
const FString& PluginName, |
GameFeaturesSubsystem.h | ||
static FString GetPluginURL_InstallBundleProtocol
(
const FString& PluginName, |
GameFeaturesSubsystem.h | ||
static FString GetPluginURL_InstallBundleProtocol
(
const FString& PluginName, |
GameFeaturesSubsystem.h | ||
static EGameFeaturePluginProtocol GetPluginURLProtocol
(
FStringView PluginURL |
Returns the plugin protocol for the specified URL | GameFeaturesSubsystem.h | |
static bool IsPluginURLProtocol
(
FStringView PluginURL, |
Tests whether the plugin URL is the specified protocol | GameFeaturesSubsystem.h | |
static TSharedPtr< FStreamableHandle > LoadGameFeatureData
(
const FString& GameFeatureToLoad, |
Loads the specified game feature data and its bundles | GameFeaturesSubsystem.h | |
static bool ParsePluginURL
(
FStringView PluginURL, |
Parse the plugin URL into subparts | GameFeaturesSubsystem.h | |
static bool ParsePluginURLOptions
(
FStringView URLOptionsString, |
GameFeaturesSubsystem.h | ||
static bool ParsePluginURLOptions
(
FStringView URLOptionsString, |
GameFeaturesSubsystem.h | ||
static bool ParsePluginURLOptions
(
FStringView URLOptionsString, |
GameFeaturesSubsystem.h | ||
static bool ParsePluginURLOptions
(
FStringView URLOptionsString, |
Parse options from a plugin URL or the options subpart of the plugin URL | GameFeaturesSubsystem.h | |
static void RemoveGameFeatureFromAssetManager
(
const UGameFeatureData* GameFeatureToRemove, |
GameFeaturesSubsystem.h | ||
static void UnloadGameFeatureData
(
const UGameFeatureData* GameFeatureToUnload |
GameFeaturesSubsystem.h |