Navigation
Unreal Engine C++ API Reference > Runtime > AssetRegistry > AssetRegistry
References
Module | AssetRegistry |
Header | /Engine/Source/Runtime/AssetRegistry/Public/AssetRegistry/IAssetRegistry.h |
Include | #include "AssetRegistry/IAssetRegistry.h" |
Syntax
class IAssetRegistry
Remarks
Global singleton interface for accessing a catalog of all packages (and some other content file types) that are stored in any mounted directory. In editor this information is gathered from the package files on disk during a gather step at editor startup. In cooked runtimes this information was calculated during cook and is serialized out of a single file (after pruning information not necessary at runtime.)
Some API notes:
bIncludeOnlyOnDiskAssets Most query functions that return FAssetData take this argument. If true, only data collected from disk and stored in the AssetRegistry will be returned. If false, and the object is loaded in memory, the returned AssetData will be calculated from the object in memory because the InMemoryData is more likely to be up-to-date. The InMemory data will sometimes vary from the DiskGatheredData.
When InMemoryData is returned some categories of data that are always missing from the object in memory (e.g. GetAssetRegistryTags(EAssetRegistryTagsCaller::SavePackage)) are read from the DiskGatheredData and added to the InMemoryData.
Setting this value to true will always be faster than setting it to false, because the same registry lookups are performed in either case, but the InMemoryData lookup is skipped in the true case.
The default is usually false.
Functions
Type | Name | Description | |
---|---|---|---|
![]() |
bool | Adds the specified path to the set of cached paths. | |
![]() |
void | AppendState
(
const FAssetRegistryState& InState |
Append the assets from the incoming state into our own |
![]() |
void | AssetCreated
(
UObject* NewAsset |
Informs the asset registry that an in-memory asset has been created |
![]() |
void | AssetDeleted
(
UObject* DeletedAsset |
Informs the asset registry that an in-memory asset has been deleted |
![]() |
void | AssetFullyUpdateTags
(
UObject* Object |
|
![]() |
void | AssetRenamed
(
const UObject* RenamedAsset, |
Informs the asset registry that an in-memory asset has been renamed |
![]() |
void | AssetSaved
(
const UObject& SavedAsset |
Informs the asset registry that an in-memory asset has been saved |
![]() |
void | AssetsSaved
(
TArray< FAssetData >&& Assets |
Called during SavePackage to update the AssetRegistry's copy of the AssetDatas in the package to match the newly saved values. |
![]() |
void | AssetTagsFinalized
(
const UObject& FinalizedAsset |
Informs the asset registry that an Asset has finalized its tags after loading. |
![]() |
void | AssetUpdateTags
(
UObject* Object, |
Called on demand from systems that need to fully update an AssetData's tags. |
![]() |
void | Empty the global gatherer's cache and disable further caching of scans from disk. | |
![]() ![]() |
void | CompileFilter
(
const FARFilter& InFilter, |
Modifies passed in filter optimize it for query and expand any recursive paths and classes |
![]() ![]() |
bool | ContainsTag
(
FName TagName |
Return whether the given TagName occurs in the tags of any asset in the AssetRegistry |
![]() |
DECLARE_TS_MULTICAST_DELEGATE
(
FScanStartedEvent |
||
![]() |
DECLARE_TS_MULTICAST_DELEGATE
(
FFilesLoadedEvent |
Event for when the asset registry is done loading files | |
![]() |
DECLARE_TS_MULTICAST_DELEGATE
(
FScanEndedEvent |
||
![]() |
DECLARE_TS_MULTICAST_DELEGATE_OneParam
(
FFileLoadProgressUpdatedEvent, |
Event to update the progress of the background file load | |
![]() |
DECLARE_TS_MULTICAST_DELEGATE_OneParam
(
FVerseRemovedEvent, |
Event for when Verse files are removed from the registry | |
![]() |
DECLARE_TS_MULTICAST_DELEGATE_OneParam
(
FVerseAddedEvent, |
Event for when Verse files are added to the registry | |
![]() |
DECLARE_TS_MULTICAST_DELEGATE_OneParam
(
FInMemoryAssetDeletedEvent, |
Event for when assets are deleted | |
![]() |
DECLARE_TS_MULTICAST_DELEGATE_OneParam
(
FInMemoryAssetCreatedEvent, |
Event for when in-memory assets are created | |
![]() |
DECLARE_TS_MULTICAST_DELEGATE_OneParam
(
FAssetUpdatedEvent, |
Event for when assets are updated in the registry | |
![]() |
DECLARE_TS_MULTICAST_DELEGATE_OneParam
(
FAssetRemovedEvent, |
Event for when assets are removed from the registry | |
![]() |
DECLARE_TS_MULTICAST_DELEGATE_OneParam
(
FAssetAddedEvent, |
Event for when assets are added to the registry | |
![]() |
DECLARE_TS_MULTICAST_DELEGATE_OneParam
(
FAssetsEvent, |
||
![]() |
DECLARE_TS_MULTICAST_DELEGATE_OneParam
(
FPathAddedEvent, |
||
![]() |
DECLARE_TS_MULTICAST_DELEGATE_OneParam
(
FPathsEvent, |
Events for when paths (folders/directories) are added to and removed from the asset registry. | |
![]() |
DECLARE_TS_MULTICAST_DELEGATE_TwoParams
(
FAssetRenamedEvent, |
Event for when assets are renamed in the registry | |
![]() ![]() |
bool | DoesPackageExistOnDisk
(
FName PackageName, |
Checks if the specified package exists on disk. |
![]() ![]() |
void | Writes out the state in textual form. Use arguments to control which segments to emit. | |
![]() ![]() |
bool | EnumerateAllAssets
(
TFunctionRef< bool(const FAssetData&)> Callback |
Enumerate asset data for all assets currently cached in the asset registry. |
![]() ![]() |
bool | EnumerateAllAssets
(
TFunctionRef< bool(const FAssetData&)> Callback, |
Enumerate asset data for all assets in the registry. |
![]() ![]() |
bool | EnumerateAllAssets
(
TFunctionRef< bool(const FAssetData&)> Callback, |
|
![]() ![]() |
void | EnumerateAllCachedPaths
(
TFunctionRef< bool(FName)> Callback |
Enumerate all the paths that are currently cached |
![]() ![]() |
void | EnumerateAllCachedPaths
(
TFunctionRef< bool(FString)> Callback |
Enumerate all the paths that are currently cached |
![]() ![]() |
void | EnumerateAllPackages
(
TFunctionRef< void(FName PackageName, const FAssetPackageData&PackageData)> Callback |
Enumerate all PackageDatas in the AssetRegistry. |
![]() ![]() |
bool | EnumerateAssets
(
const FARFilter& Filter, |
Enumerate asset data for all assets that match the filter. |
![]() ![]() |
bool | EnumerateAssets
(
const FARCompiledFilter& Filter, |
|
![]() ![]() |
bool | EnumerateAssets
(
const FARFilter& Filter, |
|
![]() ![]() |
bool | EnumerateAssets
(
const FARCompiledFilter& Filter, |
|
![]() ![]() |
bool | EnumerateAssets
(
const FARFilter& Filter, |
Enumerate asset data for all assets that match the filter. |
![]() ![]() |
bool | EnumerateAssets
(
const FARCompiledFilter& Filter, |
|
![]() ![]() |
void | EnumerateSubPaths
(
const FString& InBasePath, |
Enumerate the all paths that are currently cached below the passed-in base path |
![]() ![]() |
void | EnumerateSubPaths
(
const FName InBasePath, |
Enumerate the all paths that are currently cached below the passed-in base path |
![]() ![]() |
IAssetRegistry * | Get () |
|
![]() ![]() ![]() ![]() |
bool | GetAllAssets
(
TArray< FAssetData >& OutAssetData, |
Gets asset data for all assets in the registry. |
![]() ![]() ![]() ![]() |
void | GetAllCachedPaths
(
TArray< FString >& OutPathList |
Gets a list of all paths that are currently cached |
![]() ![]() |
SIZE_T | GetAllocatedSize
(
bool bLogDetailed |
Returns memory size of entire registry, optionally logging sizes |
![]() ![]() ![]() ![]() |
bool | GetAncestorClassNames
(
FTopLevelAssetPath ClassPathName, |
Returns true if the specified ClassName's ancestors could be found. |
![]() ![]() |
EAssetAvailability::Type | GetAssetAvailability
(
const FAssetData& AssetData |
Gets the current availability of an asset, primarily for streaming install purposes. |
![]() ![]() |
float | GetAssetAvailabilityProgress
(
const FAssetData& AssetData, |
Gets an ETA or percentage complete for an asset that is still in the process of being installed. |
![]() ![]() |
bool | ||
![]() ![]() ![]() ![]() |
FAssetData | GetAssetByObjectPath
(
const FName ObjectPath, |
Gets the asset data for the specified object path |
![]() ![]() |
FAssetData | GetAssetByObjectPath
(
const FSoftObjectPath& ObjectPath, |
Gets the asset data for the specified object path |
![]() ![]() |
TOptional< FAssetPackageData > | GetAssetPackageDataCopy
(
FName PackageName |
Finds Package data for a package name. |
![]() ![]() |
TArray< TOptional< FAssetPackageData > > | GetAssetPackageDatasCopy
(
TArrayView< FName > PackageNames |
Find Package Data for the packages name. |
![]() ![]() |
const FAssetRegistryState * | ||
![]() ![]() ![]() ![]() |
bool | GetAssets
(
const FARFilter& Filter, |
Gets asset data for all assets that match the filter. |
![]() ![]() ![]() ![]() |
bool | GetAssets
(
const FARCompiledFilter& Filter, |
|
![]() ![]() ![]() ![]() |
bool | GetAssetsByClass
(
FTopLevelAssetPath ClassPathName, |
Gets asset data for all assets with the supplied class |
![]() ![]() ![]() ![]() |
bool | GetAssetsByPackageName
(
FName PackageName, |
Gets asset data for the assets in the package with the specified package name |
![]() ![]() ![]() ![]() |
bool | GetAssetsByPath
(
FName PackagePath, |
Gets asset data for all assets in the supplied folder path |
![]() ![]() ![]() ![]() |
bool | GetAssetsByPaths
(
TArray< FName > PackagePaths, |
Gets asset data for all assets in any of the supplied folder paths |
![]() ![]() |
bool | GetAssetsByTags
(
const TArray< FName >& AssetTags, |
Gets asset data for all assets with the supplied tags, regardless of their value |
![]() ![]() |
bool | GetAssetsByTagValues
(
const TMultiMap< FName, FString >& AssetTagsAndValues, |
Gets asset data for all assets with the supplied tags and values |
![]() ![]() |
const TSet< FName > & | ||
![]() ![]() |
TSet< FName > | Returns the set of empty package names fast iteration | |
![]() ![]() |
IAssetRegistry & | GetChecked () |
|
![]() ![]() |
bool | GetDependencies
(
FName PackageName, |
Gets a list of PackageNames that are referenced by the supplied package. (On disk references ONLY) |
![]() ![]() |
bool | GetDependencies
(
const FAssetIdentifier& AssetIdentifier, |
|
![]() ![]() |
bool | GetDependencies
(
const FAssetIdentifier& AssetIdentifier, |
Gets a list of AssetIdentifiers or FAssetDependencies that are referenced by the supplied AssetIdentifier. |
![]() ![]() ![]() ![]() |
void | GetDerivedClassNames
(
const TArray< FTopLevelAssetPath >& ClassNames, |
Returns the names of all classes derived by the supplied class names, excluding any classes matching the excluded class names. |
![]() ![]() |
FName | GetFirstPackageByName
(
FStringView PackageName |
Returns the first LongPackageName found for the given PackageName. |
![]() ![]() ![]() ![]() |
bool | GetInMemoryAssets
(
const FARCompiledFilter& Filter, |
|
![]() ![]() ![]() ![]() |
bool | GetInMemoryAssets
(
const FARFilter& Filter, |
Gets asset data for in-memory assets only, that match the filter. |
![]() ![]() |
void | GetPackagesByName
(
FStringView PackageName, |
Gets the LongPackageName for all packages with the given PackageName. |
![]() |
FSoftObjectPath | GetRedirectedObjectPath
(
const FSoftObjectPath& ObjectPath |
Uses the asset registry to look for ObjectRedirectors. |
![]() ![]() |
bool | GetReferencers
(
FName PackageName, |
Gets a list of PackageNames that reference the supplied package. (On disk references ONLY) |
![]() ![]() |
bool | GetReferencers
(
const FAssetIdentifier& AssetIdentifier, |
|
![]() ![]() |
bool | GetReferencers
(
const FAssetIdentifier& AssetIdentifier, |
Gets a list of AssetIdentifiers or FAssetDependencies that reference the supplied AssetIdentifier. |
![]() ![]() |
void | GetSubPaths
(
const FName& InBasePath, |
Gets a list of all paths by name that are currently cached below the passed-in base path |
![]() ![]() ![]() ![]() |
void | GetSubPaths
(
const FString& InBasePath, |
Gets a list of all paths that are currently cached below the passed-in base path |
![]() ![]() |
bool | Returns true if temporary caching mode enabled | |
![]() ![]() |
bool | GetVerseFilesByPath
(
FName PackagePath, |
Gets paths for all Verse files in the supplied folder |
![]() ![]() ![]() ![]() |
bool | Does the given path contain assets, optionally also testing sub-paths? | |
![]() ![]() |
bool | HasVerseFiles
(
FName PackagePath, |
Returns whether the supplied folder contains any verse file |
![]() ![]() |
void | InitializeSerializationOptions
(
FAssetRegistrySerializationOptions& Options, |
Fills in FAssetRegistrySerializationOptions from ini, optionally using a target platform ini name |
![]() ![]() |
void | InitializeTemporaryAssetRegistryState
(
FAssetRegistryState& OutState, |
Fills in a AssetRegistryState with a copy of the data in the internal cache, overriding some |
![]() ![]() |
bool | IsAssetExcludedByFilter
(
const FAssetData& AssetData, |
Tests to see whether the given asset would be excluded (fails) the given filter |
![]() ![]() |
bool | IsAssetIncludedByFilter
(
const FAssetData& AssetData, |
Tests to see whether the given asset would be included (passes) the given filter |
![]() ![]() ![]() ![]() |
bool | Returns true if the asset registry is currently loading files and does not yet know about all assets | |
![]() ![]() |
bool | IsPathBeautificationNeeded
(
const FString& InAssetPath |
Indicates if path should be beautified before presented to the user. |
![]() ![]() ![]() ![]() |
bool | Whether SearchAllAssets has been called, or was auto-called at startup. | |
![]() ![]() ![]() ![]() |
bool | Whether searching is done async (and was started at startup), or synchronously and on-demand, requiring ScanPathsSynchronous or SearchAllAssets. | |
![]() ![]() ![]() ![]() ![]() ![]() |
FAssetData | K2_GetAssetByObjectPath
(
const FSoftObjectPath& ObjectPath, |
Gets the asset data for the specified object path |
![]() ![]() ![]() ![]() ![]() |
bool | K2_GetDependencies
(
FName PackageName, |
Gets a list of paths to objects that are referenced by the supplied package. |
![]() ![]() ![]() ![]() ![]() |
bool | K2_GetReferencers
(
FName PackageName, |
Gets a list of packages that reference the supplied package. (On disk references ONLY) |
![]() ![]() |
void | LoadPackageRegistryData
(
FArchive& Ar, |
Load FPackageRegistry data from the supplied package |
![]() ![]() |
void | LoadPackageRegistryData
(
const FString& PackageFilename, |
Load FAssetData from the specified package filename |
![]() |
FAssetAddedEvent & | OnAssetAdded () |
|
![]() |
FAssetRemovedEvent & | ||
![]() |
FAssetRenamedEvent & | ||
![]() |
FAssetsEvent & | Event for when assets are added to the registry to handle batches more efficiently | |
![]() |
FAssetsEvent & | Event for when assets are removed from the registry | |
![]() |
FAssetsEvent & | Event for when assets are updated in the registry | |
![]() |
FAssetsEvent & | Event for when assets are updated on disk and have been refreshed in the assetregistry | |
![]() |
FAssetUpdatedEvent & | ||
![]() |
FAssetUpdatedEvent & | Event for when assets are updated on disk and have been refreshed in the assetregistry | |
![]() |
FFileLoadProgressUpdatedEvent & | ||
![]() |
FFilesBlockedEvent & | ||
![]() |
FFilesLoadedEvent & | ||
![]() |
FInMemoryAssetCreatedEvent & | ||
![]() |
FInMemoryAssetDeletedEvent & | ||
![]() |
FPathAddedEvent & | OnPathAdded () |
|
![]() |
FPathRemovedEvent & | ||
![]() |
FPathsEvent & | OnPathsAdded () |
|
![]() |
FPathsEvent & | ||
![]() |
FScanEndedEvent & | OnScanEnded () |
|
![]() |
FScanStartedEvent & | ||
![]() |
FVerseAddedEvent & | OnVerseAdded () |
|
![]() |
FVerseRemovedEvent & | ||
![]() |
void | PackageDeleted
(
UPackage* DeletedPackage |
Informs the asset registry that an in-memory package has been deleted, and all associated assets should be removed |
![]() ![]() |
bool | PathExists
(
const FString& PathToTest |
Queries whether the given path exists in the set of cached paths |
![]() ![]() |
bool | PathExists
(
const FName PathToTest |
|
![]() ![]() |
void | PrioritizeAssetInstall
(
const FAssetData& AssetData |
Hint the streaming installers to prioritize a specific asset for install. |
![]() ![]() ![]() |
void | PrioritizeSearchPath
(
const FString& PathToPrioritize |
If assets are currently being asynchronously scanned in the specified path, this will cause them to be scanned before other assets. |
![]() ![]() |
void | ReadLockEnumerateAllTagToAssetDatas
(
TFunctionRef< bool(FName TagName, FEnumerateAssetDatasFuncEnumerateAssets)> Callback |
Enumerate all pairs in State->TagToAssetDataMapAssetRegistry and call a callback on each pair. |
![]() ![]() |
void | ReadLockEnumerateTagToAssetDatas
(
TFunctionRef< void(FName TagName, const TArray< const FAssetData* >&Assets)> Callback |
Enumerate all pairs in State->TagToAssetDataMapAssetRegistry and call a callback on each pair. |
![]() |
bool | RemovePath
(
const FString& PathToRemove |
Attempts to remove the specified path to the set of cached paths. |
![]() ![]() |
void | Implementation methods for FPauseBackgroundProcessingScope. | |
![]() ![]() |
void | ||
![]() ![]() ![]() ![]() |
void | RunAssetsThroughFilter
(
TArray< FAssetData >& AssetDataList, |
Trims items out of the asset data list that do not pass the supplied filter |
![]() ![]() ![]() |
void | ScanFilesSynchronous
(
const TArray< FString >& InFilePaths, |
Scan the specified individual files right now and populate the asset registry. |
![]() ![]() ![]() |
void | ScanModifiedAssetFiles
(
const TArray< FString >& InFilePaths, |
|
![]() ![]() ![]() |
void | ScanModifiedAssetFiles
(
const TArray< FString >& InFilePaths |
Forces a rescan of specific filenames, call this when you need to refresh from disk |
![]() ![]() ![]() |
void | ScanPathsSynchronous
(
const TArray< FString >& InPaths, |
Scan the supplied paths recursively right now and populate the asset registry. |
![]() |
void | ScanSynchronous
(
const TArray< FString >& InPaths, |
Scan the supplied paths and files recursively right now and populate the asset registry. |
![]() ![]() ![]() |
void | SearchAllAssets
(
bool bSynchronousSearch |
Look for all assets on disk (can be async or synchronous) |
![]() |
void | Serialize the registry to/from a file, skipping editor only data | |
![]() |
void | Serialize
(
FStructuredArchive::FRecord Record |
|
![]() |
void | SetManageReferences
(
const TMultiMap< FAssetIdentifier, FAssetIdentifier >& ManagerMap, |
Specifies a list of manager mappings, optionally recursing to dependencies. |
![]() |
bool | SetPrimaryAssetIdForObjectPath
(
const FSoftObjectPath& ObjectPath, |
Sets the PrimaryAssetId for a specific asset. |
![]() |
void | SetTemporaryCachingMode
(
bool bEnable |
Enables or disable temporary search caching, when this is enabled scanning/searching is faster because we assume no objects are loaded between scans. |
![]() |
void | Mark that the temporary cached needs to be updated before being used again, because e.g. a new class was loaded. | |
![]() ![]() |
bool | If true, the AssetRegistry updates its on-disk information for an Asset whenever that Asset loads. | |
![]() |
void | Tick
(
float DeltaTime |
Tick the asset registry |
![]() ![]() |
UE::AssetRegistry::EExists | TryGetAssetByObjectPath
(
const FSoftObjectPath& ObjectPath, |
Tries to get the asset data for the specified object path |
![]() ![]() |
UE::AssetRegistry::EExists | TryGetAssetPackageData
(
FName PackageName, |
Tries to get the pacakge data for a specified path |
![]() ![]() |
UE::AssetRegistry::EExists | TryGetAssetPackageData
(
FName PackageName, |
Tries to get the package data for the specified package name. |
![]() ![]() |
void | UseFilterToExcludeAssets
(
TArray< FAssetData >& AssetDataList, |
Trims items out of the asset data list that pass the supplied filter |
![]() ![]() ![]() ![]() |
void | UseFilterToExcludeAssets
(
TArray< FAssetData >& AssetDataList, |
Trims items out of the asset data list that pass the supplied filter |
![]() |
bool | VerseCreated
(
const FString& FilePathOnDisk |
Informs the asset registry that a Verse file has been created on disk |
![]() |
bool | VerseDeleted
(
const FString& FilePathOnDisk |
Informs the asset registry that a Verse file has been deleted from disk |
![]() ![]() ![]() |
void | Wait for scan to be complete. | |
![]() ![]() ![]() |
void | WaitForPackage
(
const FString& PackageName |
Wait for the scan of a specific package to be complete |
![]() |
void | Wait for premade asset registry load to be completed, for use when querying the asset registry prior to flushing in ScanPathSynchronous. |
Classes
Type | Name | Description | |
---|---|---|---|
![]() |
FFileLoadProgressUpdateData | Payload data for a file progress update | |
![]() |
FFilesBlockedEvent | Event for when one or more files have been blocked from the registry | |
![]() |
FLoadPackageRegistryData | ||
![]() |
FPathRemovedEvent | ||
![]() |
FPauseBackgroundProcessingScope | Request to pause background processing of scan results while this object is in scope This can be used to allow a priority thread to perform along sequence of operations without having to contend with the background thread for data access |
Typedefs
Name | Description |
---|---|
FAssetDataFunc | |
FEnumerateAssetDatasFunc | |
ShouldSetManagerPredicate | Predicate called to decide whether to recurse into a reference when setting manager references |