Choose your operating system:
Windows
macOS
Linux
| UObjectBase
|
Module |
|
Header |
/Engine/Source/Runtime/Engine/Classes/Engine/AssetManager.h |
Include |
#include "Engine/AssetManager.h" |
class UAssetManager : public UObject
A singleton UObject that is responsible for loading and unloading PrimaryAssets, and maintaining game-specific asset references Games should override this class and change the class reference
Name | Description | ||
---|---|---|---|
|
AddedAssetSearchRoots |
List of dynamic asset search roots added past startup |
|
|
AllAssetSearchRoots |
All asset search roots including startup ones |
|
|
AlreadyScannedDirectories |
List of directories that have already been synchronously scanned |
|
|
AssetPathMap |
Map from object path to Primary Asset Id |
|
|
AssetPathRedirects |
||
|
AssetRuleOverrides |
Overridden asset management data for specific types |
|
|
bHasCompletedInitialScan |
True if we have passed the initial asset registry/type scan |
|
|
bIncludeOnlyOnDiskAssets |
True if only on-disk assets should be searched by the asset registry |
|
|
bIsGlobalAsyncScanEnvironment |
True if we are running a build that is already scanning assets globally so we can perhaps avoid scanning paths synchronously |
|
|
bIsLoadingFromPakFiles |
True if we are loading from pak files |
|
|
bIsManagementDatabaseCurrent |
True if the asset management database is up to date |
|
|
bIsPrimaryAssetDirectoryCurrent |
True if asset data is current, if false it will need to rescan before PIE |
|
|
bOnlyCookProductionAssets |
If true, DevelopmentCook assets will error when they are cooked |
|
|
bShouldAcquireMissingChunksOnLoad |
True if the chunk install interface should be queries before loading assets |
|
|
bShouldGuessTypeAndName |
True if PrimaryAssetType/Name will be implied for loading assets that don't have it saved on disk. |
|
|
bShouldUseSynchronousLoad |
True if we should always use synchronous loads, this speeds up cooking |
|
|
bTargetPlatformsAllowEditorObjects |
Suppresses bOnlyCookProductionAssets based on the AllowsEditorObjects() property of the TargetPlatforms being cooked. |
|
|
bUpdateManagementDatabaseAfterScan |
True if the asset management database should be updated after scan completes |
|
|
CachedAssetBundles |
Cached map of asset bundles, global and per primary asset |
|
|
CachedChunkMap |
Cached map of chunk ids to lists of assets in that chunk |
|
|
ChunkInstallDelegateHandle |
Delegate bound to chunk install |
|
|
ManagementParentMap |
Map from PrimaryAssetId to list of PrimaryAssetIds that are the parent of this one, for determining chunking/cooking |
|
|
NumberOfSpawnedNotifications |
Number of notifications seen in this update |
|
|
NumBulkScanRequests |
|
|
|
ObjectReferenceList |
List of UObjects that are being kept from being GCd, derived from the asset type map. |
|
|
OnAddedAssetSearchRootDelegate |
Delegate called when a new asset search root is registered |
|
|
PendingChunkInstalls |
List of chunk installs that are being waited for |
|
|
PrimaryAssetEncryptionKeyCache |
Cache of encryption keys used by each primary asset |
|
|
PrimaryAssetIdRedirects |
||
|
PrimaryAssetStateBeforePIE |
Copy of the asset state before PIE was entered, return to that when PIE completes |
|
|
PrimaryAssetTypeRedirects |
Redirector maps loaded out of AssetMigrations.ini |
|
|
StreamableManager |
The streamable manager used for all primary asset loading |
|
|
WarningInvalidAssets |
List of assets we have warned about being missing |
Name | Description | |
---|---|---|
|
UAssetManager() |
Constructor |
Name | Description | ||
---|---|---|---|
|
AcquireChunkList ( |
Call to start acquiring a list of chunks |
|
|
AcquireResourcesForAssetList ( |
Acquires a set of chunks using the platform chunk layer, then calls the passed in callback |
|
|
AcquireResourcesForAssetList ( |
Acquires a set of chunks using the platform chunk layer, then calls the passed in callback |
|
|
AcquireResourcesForPrimaryAssetList ( |
Acquires a set of chunks using the platform chunk layer, then calls the passed in callback. |
|
|
AddAssetSearchRoot ( |
Register a new asset search root of the form /AssetRoot, will notify other systems about change |
|
|
AddDynamicAsset ( |
Adds or updates a Dynamic asset, which is a runtime-specified asset that has no on disk representation, so has no FAssetData. |
|
|
ApplyCustomPrimaryAssetRulesOverride ( |
Apply a single custom primary asset rule, calls function below |
|
|
ApplyPrimaryAssetLabels() |
Handles applying Asset Labels and should be overridden to do any game-specific labelling |
|
|
CallOrRegister_OnAssetManagerCreated ( |
Register a delegate to call when the asset manager singleton is spawned, if this has already happened call immediately |
|
|
CallOrRegister_OnCompletedInitialScan ( |
Register a delegate to call when all types are scanned at startup, if this has already happened call immediately |
|
|
TSharedPtr< ... |
ChangeBundleStateForMatchingPrimaryAssets ( |
Changes the bundle state of all loaded primary assets. |
|
TSharedPtr< ... |
ChangeBundleStateForPrimaryAssets ( |
Changes the bundle state of a set of loaded primary assets. |
|
FPrimaryAsse... |
CreatePrimaryAssetIdFromChunkId ( |
Creates a PrimaryAssetId from a chunk id |
|
FPrimaryAsse... |
DeterminePrimaryAssetIdForObject ( |
If bShouldManagerDetermineTypeAndName is true in settings, this function is used to determine the primary asset id for any object that does not have it's own implementation. |
|
DoesAssetMatchSearchRules ( |
Helper function to check if a single asset passes restrictions in SearchRules, this can be used when an asset is manually registered |
|
|
DoesPrimaryAssetMatchCustomOverride ( |
Sees if a specific primary asset passes the custom override filter, subclass this to handle FilterString |
|
|
DumpAssetRegistryInfo() |
Dumps information about the Asset Registry to log |
|
|
DumpAssetTypeSummary() |
Dumps out summary of managed types to log |
|
|
DumpBundlesForAsset |
Shows a list of all bundles for the specified primary asset by primary asset id (i.e. Map:Entry) |
|
|
DumpLoadedAssetState() |
Dumps out list of loaded asset bundles to log |
|
|
DumpReferencersForPackage |
Dumps out list of primary asset -> managed assets to log |
|
|
EndPIE ( |
Called after PIE ends, resets loading state |
|
|
ExpandVirtualPaths |
Expands a list of paths that potentially use virtual paths into real directory and package paths. |
|
|
ExtractChunkIdFromPrimaryAssetId ( |
Extracts a chunk id from a primary asset id, returns INDEX_NONE if it is not PackageChunkType |
|
|
FPrimaryAsse... |
ExtractPrimaryAssetIdFromData ( |
Parses AssetData to extract the primary type/name from it. |
|
ExtractSoftObjectPaths |
Extracts all FSoftObjectPaths from a Class/Struct |
|
|
FindMissingChunkList |
Returns the list of Chunks that are not currently mounted, and are required to load the referenced assets. |
|
|
FinishInitialLoading() |
Finishes initial loading, gets called from end of Engine::Init() |
|
|
UAssetManage... |
Get() |
Returns the current AssetManager object |
|
GetAssetBundleEntries ( |
Appends all AssetBundleInfos inside a given scope |
|
|
FAssetBundle... |
GetAssetBundleEntry ( |
Returns a single AssetBundleInfo, matching Scope and Name |
|
GetAssetDataForPath ( |
Gets the FAssetData at a specific path, handles redirectors and blueprint classes correctly. |
|
|
GetAssetDataForPathInternal ( |
Internal helper function that attempts to get asset data from the specified path; Accounts for possibility of blueprint classes ending in _C |
|
|
FSoftObjectP... |
GetAssetPathForData ( |
Turns an FAssetData into FSoftObjectPath, handles adding _C as necessary |
|
IAssetRegist... |
GetAssetRegistry() |
Accessor for asset registry |
|
const TArray... |
GetAssetSearchRoots ( |
Returns all the game asset roots, includes /Game by default and any dynamic ones |
|
GetCachedPrimaryAssetEncryptionKeyGuid ( |
Get the encryption key guid attached to this primary asset. |
|
|
GetChunkEncryptionKeyGuid ( |
Retrieve the encryption key guid for a given chunk ID |
|
|
const TMap< ... |
GetChunkManagementMap() |
Returns the chunk information map computed during UpdateManagementDatabase |
|
GetContentEncryptionConfig ( |
Gathers information about which assets the game wishes to encrypt into named groups |
|
|
GetContentEncryptionGroupChunkID ( |
For a given content encryption group name (as defined in the content encryption config that the project provides, return the relevant chunk ID |
|
|
GetContentRootPathFromPackageName |
Returns the root path for the package name or path (i.e. /Game/MyPackage would return /Game/ ). |
|
|
GetEncryptionKeyAssetTagName() |
Get the asset registry tag name for encryption key data |
|
|
UAssetManage... |
GetIfValid() |
Returns the current AssetManager object if it exists, null otherwise |
|
GetManagedPackageList ( |
Returns list of asset packages managed by primary asset |
|
|
FPrimaryAsse... |
GetNameData ( |
Returns the NameData for a specific type/name pair |
|
const FPrima... |
GetNameData ( |
Returns the NameData for a specific type/name pair |
|
GetNormalizedPackagePath |
||
|
GetPackageChunkIds ( |
For a given package and platform, return what Chunks it should be assigned to, games can override this as needed. |
|
|
EPrimaryAsse... |
GetPackageCookRule ( |
Returns cook rule for a package name using Management rules, games should override this to take into account their individual workflows |
|
GetPackageManagers ( |
Returns list of PrimaryAssetIds that manage a package. |
|
|
GetPreviousPrimaryAssetIds ( |
Reads redirector list and gets a list of the redirected previous names for a Primary Asset Id |
|
|
GetPrimaryAssetBundleStateMap ( |
Fills in a TMap with the pending/active loading state of every asset |
|
|
GetPrimaryAssetData ( |
Gets the FAssetData for a primary asset with the specified type/name, will only work for once that have been scanned for already. |
|
|
GetPrimaryAssetDataList ( |
Gets list of all FAssetData for a primary asset type, returns true if any were found |
|
|
TSharedPtr< ... |
GetPrimaryAssetHandle ( |
Returns the loading handle associated with the primary asset, it can then be checked for progress or waited on |
|
FPrimaryAsse... |
GetPrimaryAssetIdForData ( |
Returns the primary asset Id for the given FAssetData, only works if in directory |
|
FPrimaryAsse... |
GetPrimaryAssetIdForObject ( |
Sees if the passed in object is a registered primary asset, if so return it. |
|
FPrimaryAsse... |
GetPrimaryAssetIdForPackage ( |
Sees if the package has a primary asset, useful if only the package name is available |
|
FPrimaryAsse... |
GetPrimaryAssetIdForPath ( |
Sees if the passed in object path is a registered primary asset, if so return it. |
|
FPrimaryAsse... |
GetPrimaryAssetIdForPath ( |
Sees if the passed in object path is a registered primary asset, if so return it. |
|
GetPrimaryAssetIdList ( |
Gets list of all FPrimaryAssetId for a primary asset type, returns true if any were found |
|
|
GetPrimaryAssetLoadSet ( |
Fills in a set of object paths with the assets that need to be loaded, for a given Primary Asset and bundle list |
|
|
AssetType &#... |
GetPrimaryAssetObject ( |
Templated versions of above |
|
UObject *... |
GetPrimaryAssetObject ( |
Gets the in-memory UObject for a primary asset id, returning nullptr if it's not in memory. |
|
TSubclassOf<... |
GetPrimaryAssetObjectClass ( |
|
|
GetPrimaryAssetObjectList ( |
Gets list of all loaded objects for a primary asset type, returns true if any were found. |
|
|
FSoftObjectP... |
GetPrimaryAssetPath ( |
Gets the FSoftObjectPath for a primary asset type and name, returns invalid if not found |
|
GetPrimaryAssetPathList ( |
Gets the list of all FSoftObjectPaths for a given type, returns true if any found |
|
|
FPrimaryAsse... |
GetPrimaryAssetRules ( |
Gets the management rules for a specific asset, this will merge the type and individual values |
|
GetPrimaryAssetSetChunkIds ( |
Returns the list of chunks assigned to the list of primary assets, which is usually a manager list. |
|
|
GetPrimaryAssetsWithBundleState ( |
Returns a list of primary assets that are in the given bundle state. |
|
|
GetPrimaryAssetTypeInfo ( |
Gets metadata for a specific asset type, returns false if not found |
|
|
GetPrimaryAssetTypeInfoList ( |
Gets list of all primary asset types infos |
|
|
GetRedirectedAssetPath ( |
Reads AssetManagerSettings for specifically redirected asset paths. |
|
|
FSoftObjectP... |
GetRedirectedAssetPath ( |
Reads AssetManagerSettings for specifically redirected asset paths. |
|
FPrimaryAsse... |
GetRedirectedPrimaryAssetId ( |
Tries to redirect a Primary Asset Id, using list in AssetManagerSettings |
|
GetResourceAcquireProgress |
Returns the chunk download/install progress. |
|
|
const UAsset... |
GetSettings() |
Return settings object |
|
FStreamableM... |
GetStreamableManager() |
Accesses the StreamableManager used by this Asset Manager. Static for easy access |
|
FTimerManage... |
GetTimerManager() |
Returns a timer manager that is safe to use for asset loading actions. |
|
GetUniqueAssetRegistryName ( |
Determine if we should separate the asset registry for this chunk out into its own file and return the unique name that identifies it |
|
|
HasInitialScanCompleted() |
Returns true if initial scan has completed, this can be pretty late in editor builds |
|
|
InitializeAssetBundlesFromMetadata ( |
Initializes asset bundle data from a passed in struct or class, this will read the AssetBundles metadata off the UProperties. |
|
|
InitializeAssetBundlesFromMetadata ( |
UObject wrapper |
|
|
InvalidatePrimaryAssetDirectory() |
Invalidate cached asset data so it knows to rescan when needed |
|
|
IsAssetDataBlueprintOfClassSet ( |
Checks to see if the given asset data is a blueprint with a base class in the ClassNameSet. |
|
|
IsBulkScanning() |
||
|
IsPathExcludedFromScan ( |
Returns true if path should be excluded from primary asset scans, called from ShouldIncludeInAssetSearch and in the editor |
|
|
IsValid() |
Returns true if there is a current asset manager |
|
|
TSharedPtr< ... |
LoadAssetList ( |
Quick wrapper to async load some non primary assets with the primary streamable manager. |
|
TSharedPtr< ... |
LoadPrimaryAsset ( |
Single asset wrapper |
|
TSharedPtr< ... |
LoadPrimaryAssets ( |
Loads a list of Primary Assets. |
|
TSharedPtr< ... |
LoadPrimaryAssetsWithType ( |
Loads all assets of a given type, useful for cooking |
|
LoadRedirectorMaps() |
Loads the redirector maps |
|
|
ModifyCook ( |
Gets package names to add to the cook, and packages to never cook even if in startup set memory or referenced |
|
|
ModifyDLCCook |
Gets package names to add to a DLC cook |
|
|
NormalizePackagePath |
Normalize a package path for use in asset manager, will remove duplicate // and add or remove a final slash as desired |
|
|
OnAssetRegistryAvailableAfterInitialization ( |
Called when a new asset registry becomes available |
|
|
OnAssetRegistryFilesLoaded() |
Called when asset registry is done loading off disk, will finish any deferred loads |
|
|
OnAssetRenamed ( |
When asset is renamed |
|
|
OnAssetStateChangeCompleted ( |
Called when an internal load handle finishes, handles setting to pending state |
|
|
OnChunkDownloaded |
Called when a new chunk has been downloaded |
|
|
OnInMemoryAssetCreated ( |
Handles updating manager when a new asset is created |
|
|
OnInMemoryAssetDeleted ( |
Handles updating manager if deleted object is relevant |
|
|
OnObjectPreSave ( |
Called when object is saved |
|
|
PopBulkScanning() |
||
|
PostInitialAssetScan() |
Called after scanning is complete, either from FinishInitialLoading or after the AssetRegistry finishes |
|
|
PostSaveAssetRegistry() |
Called immediately after saving the asset registry during cooking |
|
|
PreBeginPIE ( |
Called right before PIE starts, will refresh asset directory and can be overriden to preload assets |
|
|
TSharedPtr< ... |
PreloadPrimaryAssets ( |
Preloads data for a set of assets in a specific bundle state, and returns a handle you must keep active. |
|
PreSaveAssetRegistry ( |
Called immediately before saving the asset registry during cooking |
|
|
PushBulkScanning() |
Call before many calls to ScanPaths to improve load performance. |
|
|
RebuildObjectReferenceList() |
Rebuilds the ObjectReferenceList, needed after global object state has changed |
|
|
RecursivelyExpandBundleData ( |
This will expand out references in the passed in AssetBundleData that are pointing to other primary assets with bundles. |
|
|
RefreshAssetData ( |
Refreshes cache of asset data for in memory object |
|
|
RefreshPrimaryAssetDirectory ( |
Refresh the entire set of asset data, can call from editor when things have changed dramatically. |
|
|
FDelegateHan... |
Register_OnAddedAssetSearchRoot ( |
Call to register a callback executed when a new asset search root is added, can be used to scan for new assets |
|
RegisterSpecificPrimaryAsset ( |
Manually register a new or updated primary asset, returns true if it was successful |
|
|
ReinitializeFromConfig() |
Resets all asset manager data, called in the editor to reinitialize the config |
|
|
RemovePrimaryAssetId ( |
Try to remove an old asset identifier when it has been deleted/renamed |
|
|
ScanPathForPrimaryAssets |
Single path wrapper |
|
|
ScanPathsForPrimaryAssets |
Scans a list of paths and reads asset data for all primary assets of a specific type. |
|
|
ScanPathsSynchronous |
Helper function which requests the asset registery scan a list of directories/assets |
|
|
ScanPrimaryAssetRulesFromConfig() |
Called to apply the primary asset rule overrides from config |
|
|
ScanPrimaryAssetTypesFromConfig() |
Scans all asset types specified in DefaultGame |
|
|
SearchAssetRegistryPaths ( |
Helper function to search the asset registry for AssetData matching search rules |
|
|
SetPrimaryAssetRules ( |
Changes the management rules for a specific asset, this overrides the type rules. |
|
|
SetPrimaryAssetRulesExplicitly ( |
Changes the management rules for a specific asset, this overrides the type rules. |
|
|
SetPrimaryAssetTypeRules ( |
Changes the default management rules for a specified type |
|
|
ShouldCookForPlatform ( |
Returns whether or not a specific UPackage should be cooked for the provied TargetPlatform |
|
|
ShouldIncludeInAssetSearch ( |
Filter function that is called from SearchAssetRegistryPaths, returns true if asset data should be included in search results |
|
|
ShouldScanPrimaryAssetType ( |
Returns true if the specified TypeInfo should be scanned. Can be overridden by the game |
|
|
EAssetSetMan... |
ShouldSetManager ( |
Function used during creating Management references to decide when to recurse and set references |
|
StartBulkScanning() |
Should only be called from PushBulkScanning() and override |
|
|
StartInitialLoading() |
Starts initial load, gets called from InitializeObjectReferences |
|
|
StopBulkScanning() |
Should only be called from PopBulkScanning() and override |
|
|
TryUpdateCachedAssetData ( |
Updates the asset data cached on the name data; returns false if the asset is not a valid primary asset. |
|
|
UnloadPrimaryAsset ( |
Single asset wrapper |
|
|
UnloadPrimaryAssets ( |
Unloads a list of Primary Assets that were previously Loaded. |
|
|
UnloadPrimaryAssetsWithType ( |
Loads all assets of a given type, useful for cooking |
|
|
Unregister_OnAddedAssetSearchRoot ( |
Unregister previously added callback |
|
|
UpdateManagementDatabase ( |
Updates the asset management database if needed |
|
|
VerifyCanCookPackage ( |
Returns true if the specified asset package can be cooked, will error and return false if it is disallowed |
|
|
WarnAboutInvalidPrimaryAsset ( |
Warn about this primary asset id being missing, but only if this is the first time this session |
|
|
WriteCustomReport |
Helper function to write out asset reports |
Name | Description | ||
---|---|---|---|
|
PostInitProperties() |
Called after the C++ constructor and after the properties have been initialized, including those loaded from config. |
Name |
Description |
|
---|---|---|
|
FPendingChunkInstall |
Defines a set of chunk installs that are waiting |
Name |
Description |
---|---|
AssetSearchRootsVirtualPath |
Virtual path $AssetSearchRoots, replaced with all roots including defaults like /Game |
DynamicSearchRootsVirtualPath |
Virtual path $DynamicSearchRoots, replaced with dynamically added asset roots |
MapType |
Asset Type of UWorld assets |
OnAssetManagerCreatedDelegate |
Delegate called when the asset manager singleton is created |
OnCompletedInitialScanDelegate |
Delegate called when initial span finishes |
PackageChunkType |
Type representing a packaging chunk, this is a virtual type that is never loaded off disk |
PrimaryAssetLabelType |
Asset Type of Label used to tag other assets |
Name | Description | ||
---|---|---|---|
|
ModifyCook |
Use version that takes TargetPlatforms instead |
|
|
ModifyDLCCook |
Use version that takes TargetPlatforms instead |
|
|
EAssetSetMan... |
ShouldSetManager ( |
ShouldSetManager that takes EAssetRegistryDependencyType is no longer called; switch to the version that takes EDependencyCategory |
|
VerifyCanCookPackage |
Use version that takes ICookInfo instead |