UAssetManager

A singleton [UObject](API\Runtime\CoreUObject\UObject\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

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/Engine/AssetManager.h

Include

#include "Engine/AssetManager.h"

Syntax

class UAssetManager : public UObject

Remarks

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

Variables

Name Description

Protected variable

TArray< FString...

 

AlreadyScannedDirectories

List of directories that have already been synchronously scanned

Protected variable

TMap< FName, FP...

 

AssetPathMap

Map from object path to Primary Asset Id

Protected variable

TMap< FName, FN...

 

AssetPathRedirects

Protected variable

TMap< FPrimaryA...

 

AssetRuleOverrides

Overridden asset management data for specific types

Protected variable

bool

 

bIncludeOnlyOnDiskAssets

True if only on-disk assets should be searched by the asset registry

Protected variable

bool

 

bIsBulkScanning

True if we are currently in bulk scanning mode

Protected variable

bool

 

bIsGlobalAsyncScanEnvironment

True if we are running a build that is already scanning assets globally so we can perhaps avoid scanning paths synchronously

Protected variable

bool

 

bIsLoadingFromPakFiles

True if we are loading from pak files

Protected variable

bool

 

bIsManagementDatabaseCurrent

True if the asset management database is up to date

Protected variable

bool

 

bIsPrimaryAssetDirectoryCurrent

True if asset data is current, if false it will need to rescan before PIE

Protected variable

bool

 

bOnlyCookProductionAssets

If true, DevelopmentCook assets will error when they are cooked

Protected variable

bool

 

bShouldAcquireMissingChunksOnLoad

True if the chunk install interface should be queries before loading assets

Protected variable

bool

 

bShouldGuessTypeAndName

True if PrimaryAssetType/Name will be implied for loading assets that don't have it saved on disk.

Protected variable

bool

 

bShouldUseSynchronousLoad

True if we should always use synchronous loads, this speeds up cooking

Protected variable

bool

 

bUpdateManagementDatabaseAfterScan

True if the asset management database should be updated after scan completes

Protected variable

TMap< FPrimaryA...

 

CachedAssetBundles

Cached map of asset bundles, global and per primary asset

Protected variable

TMap< int32, FA...

 

CachedChunkMap

Cached map of chunk ids to lists of assets in that chunk

Protected variable

FDelegateHandle

 

ChunkInstallDelegateHandle

Delegate bound to chunk install

Protected variable

TMap< FPrimaryA...

 

ManagementParentMap

Map from PrimaryAssetId to list of PrimaryAssetIds that are the parent of this one, for determining chunking/cooking

Protected variable

int32

 

NumberOfSpawnedNotifications

Number of notifications seen in this update

Protected variable

TArray< UObject...

 

ObjectReferenceList

List of UObjects that are being kept from being GCd, derived from the asset type map.

Protected variable

TArray< FPendin...

 

PendingChunkInstalls

List of chunk installs that are being waited for

Protected variable

TMap< FPrimaryA...

 

PrimaryAssetEncryptionKeyCache

Cache of encryption keys used by each primary asset

Protected variable

TMap< FString, ...

 

PrimaryAssetIdRedirects

Protected variable

TMap< FPrimaryA...

 

PrimaryAssetStateBeforePIE

Copy of the asset state before PIE was entered, return to that when PIE completes

Protected variable

TMap< FName, FN...

 

PrimaryAssetTypeRedirects

Redirector maps loaded out of AssetMigrations.ini

Protected variable

FStreamableMana...

 

StreamableManager

The streamable manager used for all primary asset loading

Constructors

Name Description

Public function

UAssetManager()

Constructor

Functions

Name Description

Protected function Virtual

void

 

AcquireChunkList

(
    const TArray< int32 >& ChunkList,
    FAssetManagerAcquireResourceDelegat...,
    EChunkPriority::Type Priority,
    TSharedPtr< FStreamableHandle > Sta...
)

Call to start acquiring a list of chunks

Public function Virtual

void

 

AcquireResourcesForAssetList

(
    const TArray< FSoftObjectPath >& A...,
    FAssetManagerAcquireResourceDelegat...,
    EChunkPriority::Type Priority
)

Acquires a set of chunks using the platform chunk layer, then calls the passed in callback

Public function Virtual

void

 

AcquireResourcesForPrimaryAssetList

(
    const TArray< FPrimaryAssetId >& P...,
    FAssetManagerAcquireResourceDelegat...,
    EChunkPriority::Type Priority
)

Acquires a set of chunks using the platform chunk layer, then calls the passed in callback.

Public function Virtual

bool

 

AddDynamicAsset

(
    const FPrimaryAssetId& PrimaryAsse...,
    const FSoftObjectPath& AssetPath,
    const FAssetBundleData& BundleData
)

Adds or updates a Dynamic asset, which is a runtime-specified asset that has no on disk representation, so has no FAssetData.

Protected function Virtual

void

 

ApplyCustomPrimaryAssetRulesOverride

(
    const FPrimaryAssetRulesCustomOverr...
)

Apply a single custom primary asset rule, calls function below

Public function Virtual

void

 

ApplyPrimaryAssetLabels()

Handles applying Asset Labels and should be overridden to do any game-specific labelling

Public function Virtual

TSharedPtr< ...

 

ChangeBundleStateForMatchingPrimaryAssets

(
    const TArray< FName >& NewBundles,
    const TArray< FName >& OldBundles,
    FStreamableDelegate DelegateToCall,
    TAsyncLoadPriority Priority
)

Changes the bundle state of all loaded primary assets.

Public function Virtual

TSharedPtr< ...

 

ChangeBundleStateForPrimaryAssets

(
    const TArray< FPrimaryAssetId >& A...,
    const TArray< FName >& AddBundles,
    const TArray< FName >& RemoveBundl...,
    bool bRemoveAllBundles,
    FStreamableDelegate DelegateToCall,
    TAsyncLoadPriority Priority
)

Changes the bundle state of a set of loaded primary assets.

Public function Static

FPrimaryAsse...

 

CreatePrimaryAssetIdFromChunkId

(
    int32 ChunkId
)

Creates a PrimaryAssetId from a chunk id

Public function Virtual

FPrimaryAsse...

 

DeterminePrimaryAssetIdForObject

(
    const UObject* Object
)

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.

Protected function Virtual Const

bool

 

DoesPrimaryAssetMatchCustomOverride

(
    FPrimaryAssetId PrimaryAssetId,
    const FPrimaryAssetRulesCustomOverr...
)

Sees if a specific primary asset passes the custom override filter, subclass this to handle FilterString

Public function Static

void

 

DumpAssetRegistryInfo()

Dumps information about the Asset Registry to log

Public function Static

void

 

DumpAssetTypeSummary()

Dumps out summary of managed types to log

Public function Static

void

 

DumpLoadedAssetState()

Dumps out list of loaded asset bundles to log

Public function Static

void

 

DumpReferencersForPackage

(
    const TArray< FString >& PackageNa...
)

Dumps out list of primary asset -> managed assets to log

Protected function Virtual

void

 

EndPIE

(
    bool bStartSimulate
)

Called after PIE ends, resets loading state

Public function Static

int32

 

ExtractChunkIdFromPrimaryAssetId

(
    const FPrimaryAssetId& PrimaryAsse...
)

Extracts a chunk id from a primary asset id, returns INDEX_NONE if it is not PackageChunkType

Public function Virtual Const

FPrimaryAsse...

 

ExtractPrimaryAssetIdFromData

(
    const FAssetData& AssetData,
    FPrimaryAssetType SuggestedType
)

Parses AssetData to extract the primary type/name from it.

Public function Virtual Const

void

 

ExtractSoftObjectPaths

(
    const UStruct* Struct,
    const void* StructValue,
    TArray< FSoftObjectPath >& FoundAs...,
    const TArray< FName >& PropertiesT...
)

Extracts all FSoftObjectPaths from a Class/Struct

Public function Virtual Const

bool

 

FindMissingChunkList

(
    const TArray< FSoftObjectPath >& A...,
    TArray< int32 >& OutMissingChunkLi...,
    TArray< int32 >& OutErrorChunkList
)

Returns the list of Chunks that are not currently mounted, and are required to load the referenced assets.

Public function Virtual

void

 

FinishInitialLoading()

Finishes initial loading, gets called from end of Engine::Init()

Public function Static

UAssetManage...

 

Get()

Returns the current AssetManager object

Public function Virtual Const

bool

 

GetAssetBundleEntries

(
    const FPrimaryAssetId& BundleScope,
    TArray< FAssetBundleEntry >& OutEn...
)

Appends all AssetBundleInfos inside a given scope

Public function Virtual Const

FAssetBundle...

 

GetAssetBundleEntry

(
    const FPrimaryAssetId& BundleScope,
    FName BundleName
)

Returns a single AssetBundleInfo, matching Scope and Name

Public function Virtual Const

bool

 

GetAssetDataForPath

(
    const FSoftObjectPath& ObjectPath,
    FAssetData& AssetData
)

Gets the FAssetData at a specific path, handles redirectors and blueprint classes correctly.

Protected function Virtual Const

void

 

GetAssetDataForPathInternal

(
    IAssetRegistry& AssetRegistry,
    const FString& AssetPath,
    OUTFAssetData& OutAssetData
)

Internal helper function that attempts to get asset data from the specified path; Accounts for possibility of blueprint classes ending in _C

Public function Virtual Const

FSoftObjectP...

 

GetAssetPathForData

(
    const FAssetData& AssetData
)

Turns an FAssetData into FSoftObjectPath, handles adding _C as necessary

Public function Const

IAssetRegist...

 

GetAssetRegistry()

Accessor for asset registry

Public function Virtual

void

 

GetCachedPrimaryAssetEncryptionKeyGuid

(
    FPrimaryAssetId InPrimaryAssetId,
    FGuid& OutGuid
)

Get the encryption key guid attached to this primary asset.

Public function Virtual Const

FGuid

 

GetChunkEncryptionKeyGuid

(
    int32 InChunkId
)

Retrieve the encryption key guid for a given chunk ID

Public function Const

const TMap< ...

 

GetChunkManagementMap()

Returns the chunk information map computed during UpdateManagementDatabase

Public function Virtual

void

 

GetContentEncryptionConfig

(
    FContentEncryptionConfig& OutConte...
)

Gathers information about which assets the game wishes to encrypt into named groups

Public function Virtual Const

int32

 

GetContentEncryptionGroupChunkID

(
    FName InGroupName
)

For a given content encryption group name (as defined in the content encryption config that the project provides, return the relevant chunk ID

Public function Static

FName

 

GetEncryptionKeyAssetTagName()

Get the asset registry tag name for encryption key data

Public function Static

UAssetManage...

 

GetIfValid()

Returns the current AssetManager object if it exists, null otherwise

Public function Virtual Const

bool

 

GetManagedPackageList

(
    FPrimaryAssetId PrimaryAssetId,
    TArray< FName >& AssetPackageList
)

Returns list of asset packages managed by primary asset

Protected function Const

const FPrima...

 

GetNameData

(
    const FPrimaryAssetId& PrimaryAsse...,
    bool bCheckRedirector
)

Returns the NameData for a specific type/name pair

Protected function

FPrimaryAsse...

 

GetNameData

(
    const FPrimaryAssetId& PrimaryAsse...,
    bool bCheckRedirector
)

Returns the NameData for a specific type/name pair

Public function Virtual Const

bool

 

GetPackageChunkIds

(
    FName PackageName,
    const ITargetPlatform* TargetP...,
    const TArray< int32 >& ExistingChu...,
    TArray< int32 >& OutChunkList,
    TArray< int32 >* OutOverrideCh...
)

For a given package and platform, return what Chunks it should be assigned to, games can override this as needed.

Public function Virtual Const

EPrimaryAsse...

 

GetPackageCookRule

(
    FName PackageName
)

Returns cook rule for a package name using Management rules, games should override this to take into account their individual workflows

Public function Virtual Const

bool

 

GetPackageManagers

(
    FName PackageName,
    bool bRecurseToParents,
    TSet< FPrimaryAssetId >& ManagerSe...
)

Returns list of PrimaryAssetIds that manage a package.

Public function Virtual Const

void

 

GetPreviousPrimaryAssetIds

(
    const FPrimaryAssetId& NewId,
    TArray< FPrimaryAssetId >& OutOldI...
)

Reads redirector list and gets a list of the redirected previous names for a Primary Asset Id

Public function Const

void

 

GetPrimaryAssetBundleStateMap

(
    TMap< FPrimaryAssetId, TArray< FNam...,
    bool bForceCurrent
)

Fills in a TMap with the pending/active loading state of every asset

Public function Virtual Const

bool

 

GetPrimaryAssetData

(
    const FPrimaryAssetId& PrimaryAsse...,
    FAssetData& AssetData
)

Gets the FAssetData for a primary asset with the specified type/name, will only work for once that have been scanned for already.

Public function Virtual Const

bool

 

GetPrimaryAssetDataList

(
    FPrimaryAssetType PrimaryAssetType,
    TArray< FAssetData >& AssetDataLis...
)

Gets list of all FAssetData for a primary asset type, returns true if any were found

Public function Const

TSharedPtr< ...

 

GetPrimaryAssetHandle

(
    const FPrimaryAssetId& PrimaryAsse...,
    bool bForceCurrent,
    TArray< FName >* Bundles
)

Returns the loading handle associated with the primary asset, it can then be checked for progress or waited on

Public function Virtual Const

FPrimaryAsse...

 

GetPrimaryAssetIdForData

(
    const FAssetData& AssetData
)

Returns the primary asset Id for the given FAssetData, only works if in directory

Public function Virtual Const

FPrimaryAsse...

 

GetPrimaryAssetIdForObject

(
    UObject* Object
)

Sees if the passed in object is a registered primary asset, if so return it.

Public function Virtual Const

FPrimaryAsse...

 

GetPrimaryAssetIdForPackage

(
    FName PackagePath
)

Sees if the package has a primary asset, useful if only the package name is available

Public function Virtual Const

FPrimaryAsse...

 

GetPrimaryAssetIdForPath

(
    FName ObjectPath
)

Sees if the passed in object path is a registered primary asset, if so return it.

Public function Virtual Const

FPrimaryAsse...

 

GetPrimaryAssetIdForPath

(
    const FSoftObjectPath& ObjectPath
)

Sees if the passed in object path is a registered primary asset, if so return it.

Public function Virtual Const

bool

 

GetPrimaryAssetIdList

(
    FPrimaryAssetType PrimaryAssetType,
    TArray< FPrimaryAssetId >& Primary...,
    EAssetManagerFilter Filter
)

Gets list of all FPrimaryAssetId for a primary asset type, returns true if any were found

Public function Const

bool

 

GetPrimaryAssetLoadSet

(
    TSet< FSoftObjectPath >& OutAssetL...,
    const FPrimaryAssetId& PrimaryAsse...,
    const TArray< FName >& LoadBundles,
    bool bLoadRecursive
)

Fills in a set of object paths with the assets that need to be loaded, for a given Primary Asset and bundle list

Public function Virtual Const

UObject *...

 

GetPrimaryAssetObject

(
    const FPrimaryAssetId& PrimaryAsse...
)

Gets the in-memory UObject for a primary asset id, returning nullptr if it's not in memory.

Public function Const

AssetType &#...

 

GetPrimaryAssetObject

(
    const FPrimaryAssetId& PrimaryAsse...
)

Templated versions of above

Public function Const

TSubclassOf<...

 

GetPrimaryAssetObjectClass

(
    const FPrimaryAssetId& PrimaryAsse...
)

Public function Virtual Const

bool

 

GetPrimaryAssetObjectList

(
    FPrimaryAssetType PrimaryAssetType,
    TArray< UObject* >& ObjectLis...
)

Gets list of all loaded objects for a primary asset type, returns true if any were found.

Public function Virtual Const

FSoftObjectP...

 

GetPrimaryAssetPath

(
    const FPrimaryAssetId& PrimaryAsse...
)

Gets the FSoftObjectPath for a primary asset type and name, returns invalid if not found

Public function Virtual Const

bool

 

GetPrimaryAssetPathList

(
    FPrimaryAssetType PrimaryAssetType,
    TArray< FSoftObjectPath >& AssetPa...
)

Gets the list of all FSoftObjectPaths for a given type, returns true if any found

Public function Virtual Const

FPrimaryAsse...

 

GetPrimaryAssetRules

(
    FPrimaryAssetId PrimaryAssetId
)

Gets the management rules for a specific asset, this will merge the type and individual values

Public function Virtual Const

bool

 

GetPrimaryAssetSetChunkIds

(
    const TSet< FPrimaryAssetId >& Pri...,
    const ITargetPlatform* TargetP...,
    const TArray< int32 >& ExistingChu...,
    TArray< int32 >& OutChunkList
)

Returns the list of chunks assigned to the list of primary assets, which is usually a manager list.

Public function Const

bool

 

GetPrimaryAssetsWithBundleState

(
    TArray< FPrimaryAssetId >& Primary...,
    const TArray< FPrimaryAssetType >&...,
    const TArray< FName >& RequiredBun...,
    const TArray< FName >& ExcludedBun...,
    bool bForceCurrent
)

Returns a list of primary assets that are in the given bundle state.

Public function Virtual Const

bool

 

GetPrimaryAssetTypeInfo

(
    FPrimaryAssetType PrimaryAssetType,
    FPrimaryAssetTypeInfo& AssetTypeIn...
)

Gets metadata for a specific asset type, returns false if not found

Public function Virtual Const

void

 

GetPrimaryAssetTypeInfoList

(
    TArray< FPrimaryAssetTypeInfo >& A...
)

Gets list of all primary asset types infos

Public function Virtual Const

FSoftObjectP...

 

GetRedirectedAssetPath

(
    const FSoftObjectPath& OldPath
)

Reads AssetManagerSettings for specifically redirected asset paths.

Public function Virtual Const

FName

 

GetRedirectedAssetPath

(
    FName OldPath
)

Reads AssetManagerSettings for specifically redirected asset paths.

Public function Virtual Const

FPrimaryAsse...

 

GetRedirectedPrimaryAssetId

(
    const FPrimaryAssetId& OldId
)

Tries to redirect a Primary Asset Id, using list in AssetManagerSettings

Public function Virtual Const

bool

 

GetResourceAcquireProgress

(
    int32& OutAcquiredCount,
    int32& OutRequestedCount
)

Returns the chunk download/install progress.

Public function Const

const UAsset...

 

GetSettings()

Return settings object

Public function Static

FStreamableM...

 

GetStreamableManager()

Accesses the StreamableManager used by this Asset Manager. Static for easy access

Public function Const

FTimerManage...

 

GetTimerManager()

Returns a timer manager that is safe to use for asset loading actions.

Public function Virtual Const

FName

 

GetUniqueAssetRegistryName

(
    int32 InChunkIndex
)

Determine if we should separate the asset registry for this chunk out into its own file and return the unique name that identifies it

Public function Virtual Const

void

 

InitializeAssetBundlesFromMetadata

(
    const UStruct* Struct,
    const void* StructValue,
    FAssetBundleData& AssetBundle,
    FName DebugName
)

Initializes asset bundle data from a passed in struct or class, this will read the AssetBundles metadata off the UProperties.

Public function Virtual Const

void

 

InitializeAssetBundlesFromMetadata

(
    const UObject* Object,
    FAssetBundleData& AssetBundle
)

UObject wrapper

Protected function Virtual

void

 

InvalidatePrimaryAssetDirectory()

Invalidate cached asset data so it knows to rescan when needed

Public function Virtual

bool

 

IsAssetDataBlueprintOfClassSet

(
    const FAssetData& AssetData,
    const TSet< FName >& ClassNameSet
)

Checks to see if the given asset data is a blueprint with a base class in the ClassNameSet.

Protected function Virtual Const

bool

 

IsPathExcludedFromScan

(
    const FString& Path
)

Returns true if path should be excluded from primary asset scans

Public function Static

bool

 

IsValid()

Returns true if there is a current asset manager

Public function Virtual

TSharedPtr< ...

 

LoadAssetList

(
    const TArray< FSoftObjectPath >& A...,
    FStreamableDelegate DelegateToCall,
    TAsyncLoadPriority Priority,
    const FString& DebugName
)

Quick wrapper to async load some non primary assets with the primary streamable manager.

Public function Virtual

TSharedPtr< ...

 

LoadPrimaryAsset

(
    const FPrimaryAssetId& AssetToLoad,
    const TArray< FName >& LoadBundles,
    FStreamableDelegate DelegateToCall,
    TAsyncLoadPriority Priority
)

Single asset wrapper

Public function Virtual

TSharedPtr< ...

 

LoadPrimaryAssets

(
    const TArray< FPrimaryAssetId >& A...,
    const TArray< FName >& LoadBundles,
    FStreamableDelegate DelegateToCall,
    TAsyncLoadPriority Priority
)

Loads a list of Primary Assets.

Public function Virtual

TSharedPtr< ...

 

LoadPrimaryAssetsWithType

(
    FPrimaryAssetType PrimaryAssetType,
    const TArray< FName >& LoadBundles,
    FStreamableDelegate DelegateToCall,
    TAsyncLoadPriority Priority
)

Loads all assets of a given type, useful for cooking

Public function Virtual

void

 

LoadRedirectorMaps()

Loads the redirector maps

Public function Virtual

void

 

ModifyCook

(
    TArray< FName >& PackagesToCook,
    TArray< FName >& PackagesToNeverCo...
)

Gets package names to add to the cook, and packages to never cook even if in startup set memory or referenced

Protected function

bool

 

OnAssetRegistryAvailableAfterInitialization

(
    FName InName,
    FAssetRegistryState& OutNewState
)

Called when a new asset registry becomes available

Protected function Virtual

void

 

OnAssetRegistryFilesLoaded()

Called when asset registry is done loading off disk, will finish any deferred loads

Protected function Virtual

void

 

OnAssetRenamed

(
    const FAssetData& NewData,
    const FString& OldPath
)

When asset is renamed

Protected function Virtual

void

 

OnAssetStateChangeCompleted

(
    FPrimaryAssetId PrimaryAssetId,
    TSharedPtr< FStreamableHandle > Bou...,
    FStreamableDelegate WrappedDelegate
)

Called when an internal load handle finishes, handles setting to pending state

Protected function Virtual

void

 

OnChunkDownloaded

(
    uint32 ChunkId,
    bool bSuccess
)

Called when a new chunk has been downloaded

Protected function Virtual

void

 

OnInMemoryAssetCreated

(
    UObject* Object
)

Handles updating manager when a new asset is created

Protected function Virtual

void

 

OnInMemoryAssetDeleted

(
    UObject* Object
)

Handles updating manager if deleted object is relevant

Protected function Virtual

void

 

OnObjectPreSave

(
    UObject* Object
)

Called when object is saved

Protected function Virtual

void

 

PostInitialAssetScan()

Called after scanning is complete, either from FinishInitialLoading or after the AssetRegistry finishes

Public function Virtual

void

 

PostSaveAssetRegistry()

Called immediately after saving the asset registry during cooking

Protected function Virtual

void

 

PreBeginPIE

(
    bool bStartSimulate
)

Called right before PIE starts, will refresh asset directory and can be overriden to preload assets

Public function Virtual

TSharedPtr< ...

 

PreloadPrimaryAssets

(
    const TArray< FPrimaryAssetId >& A...,
    const TArray< FName >& LoadBundles,
    bool bLoadRecursive,
    FStreamableDelegate DelegateToCall,
    TAsyncLoadPriority Priority
)

Preloads data for a set of assets in a specific bundle state, and returns a handle you must keep active.

Public function Virtual

void

 

PreSaveAssetRegistry

(
    const ITargetPlatform* TargetP...,
    const TSet< FName >& InCookedPacka...
)

Called immediately before saving the asset registry during cooking

Protected function Virtual

void

 

RebuildObjectReferenceList()

Rebuilds the ObjectReferenceList, needed after global object state has changed

Public function Virtual Const

void

 

RecursivelyExpandBundleData

(
    FAssetBundleData& BundleData
)

This will expand out references in the passed in AssetBundleData that are pointing to other primary assets with bundles.

Public function Virtual

void

 

RefreshAssetData

(
    UObject* ChangedObject
)

Refreshes cache of asset data for in memory object

Public function Virtual

void

 

RefreshPrimaryAssetDirectory

(
    bool bForceRefresh
)

Refresh the entire set of asset data, can call from editor when things have changed dramatically.

Public function Virtual

void

 

ReinitializeFromConfig()

Resets all asset manager data, called in the editor to reinitialize the config

Protected function Virtual

void

 

RemovePrimaryAssetId

(
    const FPrimaryAssetId& PrimaryAsse...
)

Try to remove an old asset identifier when it has been deleted/renamed

Public function Virtual

int32

 

ScanPathForPrimaryAssets

(
    FPrimaryAssetType PrimaryAssetType,
    const FString& Path,
    UClass* BaseClass,
    bool bHasBlueprintClasses,
    bool bIsEditorOnly,
    bool bForceSynchronousScan
)

Single path wrapper

Public function Virtual

int32

 

ScanPathsForPrimaryAssets

(
    FPrimaryAssetType PrimaryAssetType,
    const TArray< FString >& Paths,
    UClass* BaseClass,
    bool bHasBlueprintClasses,
    bool bIsEditorOnly,
    bool bForceSynchronousScan
)

Scans a list of paths and reads asset data for all primary assets of a specific type.

Protected function Virtual Const

void

 

ScanPathsSynchronous

(
    const TArray< FString >& PathsToSc...
)

Helper function which requests the asset register scan a list of directories/assets

Protected function Virtual

void

 

ScanPrimaryAssetRulesFromConfig()

Called to apply the primary asset rule overrides from config

Protected function Virtual

void

 

ScanPrimaryAssetTypesFromConfig()

Scans all asset types specified in DefaultGame

Public function Virtual

void

 

SetPrimaryAssetRules

(
    FPrimaryAssetId PrimaryAssetId,
    const FPrimaryAssetRules& Rules
)

Changes the management rules for a specific asset, this overrides the type rules.

Public function Virtual

void

 

SetPrimaryAssetRulesExplicitly

(
    FPrimaryAssetId PrimaryAssetId,
    const FPrimaryAssetRulesExplicitOve...
)

Changes the management rules for a specific asset, this overrides the type rules.

Public function Virtual

void

 

SetPrimaryAssetTypeRules

(
    FPrimaryAssetType PrimaryAssetType,
    const FPrimaryAssetRules& Rules
)

Changes the default management rules for a specified type

Public function Virtual

bool

 

ShouldCookForPlatform

(
    const UPackage* Package,
    const ITargetPlatform* TargetP...
)

Returns whether or not a specific UPackage should be cooked for the provied TargetPlatform

Protected function Virtual Const

bool

 

ShouldScanPrimaryAssetType

(
    FPrimaryAssetTypeInfo& TypeInfo
)

Returns true if the specified TypeInfo should be scanned. Can be implemented by the game.

Protected function Virtual Const

EAssetSetMan...

 

ShouldSetManager

(
    const FAssetIdentifier& Manager,
    const FAssetIdentifier& Source,
    const FAssetIdentifier& Target,
    EAssetRegistryDependencyType::Type ...,
    EAssetSetManagerFlags::Type Flags
)

Function used during creating Management references to decide when to recurse and set references

Public function Virtual

void

 

StartBulkScanning()

Call this before many calls to ScanPaths to improve load performance.

Public function Virtual

void

 

StartInitialLoading()

Starts initial load, gets called from InitializeObjectReferences

Public function Virtual

void

 

StopBulkScanning()

Public function Virtual

int32

 

UnloadPrimaryAsset

(
    const FPrimaryAssetId& AssetToUnlo...
)

Single asset wrapper

Public function Virtual

int32

 

UnloadPrimaryAssets

(
    const TArray< FPrimaryAssetId >& A...
)

Unloads a list of Primary Assets that were previously Loaded.

Public function Virtual

int32

 

UnloadPrimaryAssetsWithType

(
    FPrimaryAssetType PrimaryAssetType
)

Loads all assets of a given type, useful for cooking

Protected function Virtual

void

 

UpdateCachedAssetData

(
    const FPrimaryAssetId& PrimaryAsse...,
    const FAssetData& NewAssetData,
    bool bAllowDuplicates
)

Updates the asset data cached on the name data

Public function Virtual

void

 

UpdateManagementDatabase

(
    bool bForceRefresh
)

Updates the asset management database if needed

Public function Virtual Const

bool

 

VerifyCanCookPackage

(
    FName PackageName,
    bool bLogError
)

Returns true if the specified asset package can be cooked, will error and return false if it is disallowed

Protected function Virtual Const

bool

 

WriteCustomReport

(
    FString FileName,
    TArray< FString >& FileLines
)

Helper function to write out asset reports

Overridden from UObject

Name Description

Public function Virtual

void

 

PostInitProperties()

Called after the C++ constructor and after the properties have been initialized, including those loaded from config.

Classes

Name

Description

Protected struct

FPendingChunkInstall

Defines a set of chunk installs that are waiting

Constants

Name

Description

MapType

Asset Type of UWorld assets

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

Select Skin
Light
Dark

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback