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
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UGameFeaturesSubsystem
(
const FObjectInitializer& ObjectInitializer |
GameFeaturesSubsystem.h |
Structs
| Name | Remarks |
|---|---|
| FAmmortizedLoadContext | |
| FGameFeatureBatchProcessingFence | Active fences |
Enums
Public
| Name | Remarks |
|---|---|
| EObserverPluginStateUpdateMode |
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 |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| DlcPlugins | TSet< FString > | GameFeaturesSubsystem.h | |
| OnGameFeaturePolicyPostInit | FSimpleMulticastDelegate | GameFeaturesSubsystem.h | |
| OnGameFeaturePolicyPreInit | FSimpleMulticastDelegate | GameFeaturesSubsystem.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| ActiveAmmoritzedLoads | TMap< FGuid, TWeakPtr< FAmmortizedLoadContext > > | GameFeaturesSubsystem.h | ||
| BatchProcessingFences | TMap< EGameFeaturePluginState, FGameFeatureBatchProcessingFence > | GameFeaturesSubsystem.h | ||
| bInitializedPolicyManager | bool | GameFeaturesSubsystem.h | ||
| bLoadedBuiltInDetails | bool | GameFeaturesSubsystem.h | ||
| CachedGameFeaturePluginDetailsLock | FTransactionallySafeRWLock | GameFeaturesSubsystem.h | ||
| CachedPluginDetailsByFilename | TMap< FString, TSharedRef< const FGameFeaturePluginDetails > > | GameFeaturesSubsystem.h | ||
| DebugStateChangedForPlugins | TSet< FString > | GameFeaturesSubsystem.h | ||
| GameFeatureDataExternalAssetsPathCache | TUniquePtr< class FGameFeatureDataExternalAssetsPathCache > | GameFeaturesSubsystem.h | ||
| GameFeaturePluginNameToPathMap | TMap< FPluginString, FPluginString > | GameFeaturesSubsystem.h | ||
| GameFeaturePluginNameToPathMapLock | FTransactionallySafeRWLock | GameFeaturesSubsystem.h | ||
| GameFeaturePluginStateMachines | TMap< int64, TObjectPtr< UGameFeaturePluginStateMachine > > | The list of all game feature plugin state machine objects addressed by FGameFeaturePluginStateMachineProperties::Id | GameFeaturesSubsystem.h |
|
| GameFeaturesByIdentifier | TMap< FString, TObjectPtr< UGameFeaturePluginStateMachine > > | Lookup of game feature plugins by FGameFeaturePluginIdentifier::GetIdentifyingString | GameFeaturesSubsystem.h |
|
| GameSpecificPolicies | TObjectPtr< UGameFeaturesProjectPolicies > | GameFeaturesSubsystem.h |
|
|
| GetExplanationForUnavailablePackageDelegateHandle | FDelegateHandle | GameFeaturesSubsystem.h | ||
| NextInstanceId | int64 | Next identifier to be used for a GFP state machine. | GameFeaturesSubsystem.h | |
| Observers | TArray< TObjectPtr< UObject > > | GameFeaturesSubsystem.h | ||
| PackageLoadTracker | TUniquePtr< class UE::GameFeatures::FPackageLoadTracker > | 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 | |
| StateMachineExecutor | TPimplPtr< UE::GameFeatures::FStateMachineExecutor > | Private type controlling execution of state machine transitions when UE::GameFeatures::bUseNewExecutor | 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, |
Add Observer to be notified when plugin states change. Observer must implement IGameFeatureStateChangeObserver and be non-null. | GameFeaturesSubsystem.h | |
void AddObserver
(
UObject* Observer |
GameFeaturesSubsystem.h | ||
void CancelGameFeatureStateChange
(
const FString& PluginURL, |
GameFeaturesSubsystem.h | ||
void CancelGameFeatureStateChange
(
const FString& PluginURL |
Attempt to cancel any state change. | GameFeaturesSubsystem.h | |
void CancelGameFeatureStateChange
(
TConstArrayView< FString > PluginURLs, |
GameFeaturesSubsystem.h | ||
void ChangeGameFeatureTargetState
(
const FString& PluginURL, |
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 DeactivateGameFeaturePlugin
(
const FString& PluginURL |
Deactivates the specified plugin. Transition to [Terminal, Loaded] | GameFeaturesSubsystem.h | |
void DeactivateGameFeaturePlugin
(
const FString& PluginURL, |
GameFeaturesSubsystem.h | ||
void DeactivateGameFeaturePlugin
(
TConstArrayView< FString > PluginURLs, |
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< FAssetData >& AssetsToFilter |
Removes assets that are in plugins we know to be inactive. Order is not maintained. | 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 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 | |
TSharedPtr< const FGameFeaturePluginDetails > GetBuiltInGameFeaturePluginDetails
(
const TSharedRef< IPlugin >& Plugin |
Returns a shared pointer to immutable cached data about the given plugin. | GameFeaturesSubsystem.h | |
bool GetBuiltInGameFeaturePluginURL
(
const TSharedRef< IPlugin >& Plugin, |
Gets the URL for the given plugin, applying game-specific policies where appropriate. | GameFeaturesSubsystem.h | |
bool GetBundlesForPlugin
(
FStringView PluginName, |
Returns the required bundles for this plugin based upon the current state machine. | GameFeaturesSubsystem.h | |
| 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 | |
TSharedPtr< const FGameFeaturePluginDetails > GetGameFeaturePluginDetails
(
const FString& PluginURL |
Returns a shared pointer to immutable cached data about the given plugin if it's installed. | GameFeaturesSubsystem.h | |
bool GetGameFeaturePluginDetails
(
const FString& PluginURL, |
Gets relevant properties out of a uplugin file if it's installed | GameFeaturesSubsystem.h | |
bool GetGameFeaturePluginInstallPercent
(
const FString& PluginURL, |
Gets the Install_Percent for single game feature plugin if it is active. | GameFeaturesSubsystem.h | |
bool GetGameFeaturePluginInstallPercent
(
TConstArrayView< FString > PluginURLs, |
GameFeaturesSubsystem.h | ||
FString GetInstallBundleName
(
FStringView PluginName, |
Returns the install bundle name if one exists for this plugin. | GameFeaturesSubsystem.h | |
void GetLoadedGameFeaturePluginFilenamesForCooking
(
TArray< FString >& OutLoadedPluginFilenames |
Returns the list of plugin filenames that have progressed beyond installed. | GameFeaturesSubsystem.h | |
FString GetOptionalInstallBundleName
(
FStringView PluginName, |
Returns the optional install bundle name if one exists for this plugin. | GameFeaturesSubsystem.h | |
bool GetPluginDebugStateEnabled
(
const FString& PluginUrl |
GameFeaturesSubsystem.h | ||
| Get the plugin path from the plugin URL | GameFeaturesSubsystem.h | ||
| Get the plugin name from the plugin URL | GameFeaturesSubsystem.h | ||
EGameFeaturePluginState GetPluginState
(
FGameFeaturePluginIdentifier PluginIdentifier |
Returns the current state of the state machine for the specified plugin PluginIdentifier | GameFeaturesSubsystem.h | |
EGameFeaturePluginState GetPluginState
(
const FString& PluginURL |
Returns the current state of the state machine for the specified plugin URL | GameFeaturesSubsystem.h | |
bool GetPluginURLByName
(
FUtf8StringView PluginName, |
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 | |
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 IsGameFeaturePluginActiveByName
(
FStringView PluginName, |
Determines if a plugin is in the Active state. | GameFeaturesSubsystem.h | |
bool IsGameFeaturePluginInErrorState
(
const FString& PluginURL |
Determines if a plugin is in an error 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 | |
bool IsPluginAllowed
(
const FString& PluginURL, |
THREAD SAFETY: Any thread | GameFeaturesSubsystem.h | |
bool IsPluginAllowed
(
const FString& PluginURL, |
THREAD SAFETY: Game thread only | GameFeaturesSubsystem.h | |
void LoadAllBuiltInGameFeaturePluginDetails
(
bool bForce |
Load and cache all details for all builtin game feature plugins | GameFeaturesSubsystem.h | |
void LoadAndActivateGameFeaturePlugin
(
const FString& PluginURL, |
Loads a single game feature plugin and activates it. | GameFeaturesSubsystem.h | |
void LoadAndActivateGameFeaturePlugin
(
TConstArrayView< FString > PluginURLs, |
GameFeaturesSubsystem.h | ||
void LoadAndActivateGameFeaturePlugin
(
const FString& PluginURL, |
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 LoadBuiltInGameFeaturePlugins_Amortized
(
const TArray< TSharedRef< IPlugin > >& Plugins, |
GameFeaturesSubsystem.h | ||
void LoadGameFeaturePlugin
(
const FString& PluginURL, |
Loads a single game feature plugin. | GameFeaturesSubsystem.h | |
void LoadGameFeaturePlugin
(
TConstArrayView< FString > PluginURLs, |
GameFeaturesSubsystem.h | ||
void LoadGameFeaturePlugin
(
const FString& PluginURL, |
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
(
TConstArrayView< FString > PluginURLs, |
GameFeaturesSubsystem.h | ||
void RegisterGameFeaturePlugin
(
const FString& PluginURL, |
GameFeaturesSubsystem.h | ||
void RegisterGameFeaturePlugin
(
const FString& PluginURL, |
Registers a single game feature plugin. | GameFeaturesSubsystem.h | |
void ReleaseGameFeaturePlugin
(
const FString& PluginURL, |
GameFeaturesSubsystem.h | ||
void ReleaseGameFeaturePlugin
(
TConstArrayView< FString > PluginURLs, |
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
(
TConstArrayView< FString > PluginURLs, |
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 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
(
TConstArrayView< FString > PluginURLs, |
GameFeaturesSubsystem.h | ||
void UnloadGameFeaturePlugin
(
const FString& PluginURL, |
GameFeaturesSubsystem.h | ||
void UnloadGameFeaturePlugin
(
const FString& PluginURL, |
Unloads the specified game feature plugin. | 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 |
Public Virtual
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 void BatchProcess
(
EGameFeaturePluginState State, |
Helper static function to trigger state specific batch processing functions | GameFeaturesSubsystem.h | |
static EGameFeaturePluginState ConvertInitialFeatureStateToTargetState
(
EBuiltInAutoState InitialState |
THREAD SAFETY: Any thread. | GameFeaturesSubsystem.h | |
static EBuiltInAutoState DetermineBuiltInInitialFeatureState
(
TSharedPtr< FJsonObject > Descriptor, |
Determine the initial feature state for a built-in plugin | GameFeaturesSubsystem.h | |
static EBuiltInAutoState DetermineBuiltInInitialFeatureState
(
UE::Json::FConstObject Descriptor, |
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 const TSet< FString > & GetDlcPlugins() |
GameFeaturesSubsystem.h | ||
| Get the file path portion of a file protocol URL | 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 |
Construct a 'file:' Plugin URL using from the PluginDescriptorPath THREAD SAFETY: Any thread | GameFeaturesSubsystem.h | |
static FString GetPluginURL_FileProtocol
(
const FString& PluginDescriptorPath, |
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 FString GetPluginURL_InstallBundleProtocol
(
const FString& PluginName, |
Construct a 'installbundle:' Plugin URL using from the PluginName and required install bundles | GameFeaturesSubsystem.h | |
static EGameFeaturePluginProtocol GetPluginURLProtocol
(
FStringView PluginURL |
Returns the plugin protocol for the specified URL | GameFeaturesSubsystem.h | |
static bool IsGameFeaturePlugin
(
const TSharedPtr< IPlugin >& InPlugin |
Returns true if plugin is a GameFeaturePlugin | 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 THREAD SAFETY: Any thread | 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 |