UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
UE::AssetRegistry::Utils Namespace Reference

Enumerations

enum class  EFilterMode : uint8 { Inclusive , Exclusive }
 

Functions

void InitializeSerializationOptionsFromIni (FAssetRegistrySerializationOptions &Options, Impl::FFilterTagRules *OutRules, const ITargetPlatform *TargetPlatform, UE::AssetRegistry::ESerializationTarget Target, bool bSuppressWarnings)
 
void UpdateSerializationOptions (FAssetRegistrySerializationOptions &InOutOptions, Impl::FFilterTagRules &InOutFilterRules, bool bSuppressWarnings)
 
TMap< FName, Impl::FParsedFilterTagRulesParseFilterTags (const TArray< FString > &FilterListItems, bool bIsFilteringDevelopmentAR, bool bUseAllowListInsteadOfDenyList)
 
bool HasEngineModuleLoaded ()
 
TMap< FTopLevelAssetPath, TSet< FName > > ResolveFilterTags (Impl::FFilterTagRules &InOutRules, bool bSuppressWarnings)
 
TOptional< FAssetDataTagMapAddNonOverlappingTags (FAssetData &ExistingAssetData, const FAssetData &NewAssetData)
 
void EnumerateMemoryAssetsHelper (const FARCompiledFilter &InFilter, TSet< FName > &OutPackageNamesWithAssets, bool &bOutStopIteration, TFunctionRef< bool(const UObject *Object, FAssetData &&PartialAssetData)> Callback, bool bSkipARFilteredAssets)
 
void EnumerateMemoryAssets (const FARCompiledFilter &InFilter, TSet< FName > &OutPackageNamesWithAssets, bool &bOutStopIteration, UE::AssetRegistry::Private::FInterfaceRWLock &InterfaceLock, const FAssetRegistryState &GuardedDataState, TFunctionRef< bool(FAssetData &&)> Callback, bool bSkipARFilteredAssets)
 
void EnumerateAllMemoryAssets (TSet< FName > &OutPackageNamesWithAssets, bool &bOutStopIteration, TFunctionRef< bool(FAssetData &&)> Callback)
 
bool RunAssetThroughFilter (const FAssetData &AssetData, const FARCompiledFilter &Filter, const EFilterMode FilterMode)
 
bool RunAssetThroughFilter_Unchecked (const FAssetData &AssetData, const FARCompiledFilter &Filter, const bool bPassFilterValue)
 
void RunAssetsThroughFilter (TArray< FAssetData > &AssetDataList, const FARCompiledFilter &CompiledFilter, const EFilterMode FilterMode)
 
EAssetAvailability::Type GetAssetAvailability (const FAssetData &AssetData)
 
float GetAssetAvailabilityProgress (const FAssetData &AssetData, EAssetAvailabilityProgressReportingType::Type ReportType)
 
bool GetAssetAvailabilityProgressTypeSupported (EAssetAvailabilityProgressReportingType::Type ReportType)
 
void PrioritizeAssetInstall (const FAssetData &AssetData)
 
bool ReadAssetFile (FPackageReader &PackageReader, IAssetRegistry::FLoadPackageRegistryData &InOutData)
 
void InitializeMountPoints (TOptional< TSet< FString > > &MountPoints)
 
bool IsPathMounted (const FString &Path, const TSet< FString > &MountPointsNoTrailingSlashes, FString &StringBuffer)
 
bool IsFilterValid (const FARCompiledFilter &Filter)
 

Enumeration Type Documentation

◆ EFilterMode

Different modes for RunAssetThroughFilter and related filter functions

Enumerator
Inclusive 

Include things that pass the filter; include everything if the filter is empty

Exclusive 

Exclude things that pass the filter; exclude nothing if the filter is empty

Function Documentation

◆ AddNonOverlappingTags()

TOptional< FAssetDataTagMap > UE::AssetRegistry::Utils::AddNonOverlappingTags ( FAssetData ExistingAssetData,
const FAssetData NewAssetData 
)

◆ EnumerateAllMemoryAssets()

void UE::AssetRegistry::Utils::EnumerateAllMemoryAssets ( TSet< FName > &  OutPackageNamesWithAssets,
bool bOutStopIteration,
TFunctionRef< bool(FAssetData &&)>  Callback 
)

Iterate all UObjects where this->IsAsset and !ShouldSkipAsset, create an FAssetData for them and call the callback. Stores packagenames of all assets found in OutPackageNamesWithAssets for later filtering of on-disk assets. Stops iteration and sets bOutStopIteration=true iff the callback returns false.

◆ EnumerateMemoryAssets()

void UE::AssetRegistry::Utils::EnumerateMemoryAssets ( const FARCompiledFilter InFilter,
TSet< FName > &  OutPackageNamesWithAssets,
bool bOutStopIteration,
UE::AssetRegistry::Private::FInterfaceRWLock InterfaceLock,
const FAssetRegistryState GuardedDataState,
TFunctionRef< bool(FAssetData &&)>  Callback,
bool  bSkipARFilteredAssets 
)

Call the given callback on all UObjects in memory that pass the given filter. Fills in OutPackageNamesWithAssets with names of all packages tested.

◆ EnumerateMemoryAssetsHelper()

void UE::AssetRegistry::Utils::EnumerateMemoryAssetsHelper ( const FARCompiledFilter InFilter,
TSet< FName > &  OutPackageNamesWithAssets,
bool bOutStopIteration,
TFunctionRef< bool(const UObject *Object, FAssetData &&PartialAssetData)>  Callback,
bool  bSkipARFilteredAssets 
)

Helper for EnumerateMemoryAssets* functions. Calls the given callback on all memory assets that pass the portion of the given filter that does not require tags, and passes in an FAssetData constructed from the UObject but missing tags. Fills in OutPackageNamesWithAssets with names of all packages tested.

The portions of the filter that are safe to execute even in the UObject global hash lock in FThreadSafeObjectIterator Returns true if the object passes the filter and should be copied into an array for calling the rest of the filter outside the lock.

◆ GetAssetAvailability()

EAssetAvailability::Type UE::AssetRegistry::Utils::GetAssetAvailability ( const FAssetData AssetData)

Gets the current availability of an asset, primarily for streaming install purposes.

◆ GetAssetAvailabilityProgress()

float UE::AssetRegistry::Utils::GetAssetAvailabilityProgress ( const FAssetData AssetData,
EAssetAvailabilityProgressReportingType::Type  ReportType 
)

Gets an ETA or percentage complete for an asset that is still in the process of being installed.

◆ GetAssetAvailabilityProgressTypeSupported()

bool UE::AssetRegistry::Utils::GetAssetAvailabilityProgressTypeSupported ( EAssetAvailabilityProgressReportingType::Type  ReportType)

Returns if a given report type is supported on the current platform

◆ HasEngineModuleLoaded()

bool UE::AssetRegistry::Utils::HasEngineModuleLoaded ( )

Returns the status of Engine module existance. Used to suppress emitting warnings about missing Engine classes.

◆ InitializeMountPoints()

void UE::AssetRegistry::Utils::InitializeMountPoints ( TOptional< TSet< FString > > &  InOutMountPoints)

If InOutMountPoints is not already set, sets it and reads mount points into it from FPackageName.

◆ InitializeSerializationOptionsFromIni()

void UE::AssetRegistry::Utils::InitializeSerializationOptionsFromIni ( FAssetRegistrySerializationOptions Options,
Impl::FFilterTagRules OutRules,
const ITargetPlatform TargetPlatform = nullptr,
ESerializationTarget  Target = ESerializationTarget::ForGame,
bool  bSuppressWarnings = false 
)

This will always read the ini, public version may return cache. if OutRules is nullptr, no tags will be filtered.

◆ IsFilterValid()

bool UE::AssetRegistry::Utils::IsFilterValid ( const FARCompiledFilter Filter)

Report whether the external-code-created filter is in a state that is safe to use in filtering

◆ IsPathMounted()

bool UE::AssetRegistry::Utils::IsPathMounted ( const FString &  Path,
const TSet< FString > &  MountPointsNoTrailingSlashes,
FString &  StringBuffer 
)

Returns true if path belongs to one of the mount points provided

Parameters
PathPath to check if mounted, example "/MyPlugin/SomeAsset"
MountPointsNoTrailingSlashesMount points without the trailing slash. Example: "/MyPlugin"
StringBufferString buffer to avoid re-allocation performance hit when searching TSet

◆ ParseFilterTags()

TMap< FName, Impl::FParsedFilterTagRules > UE::AssetRegistry::Utils::ParseFilterTags ( const TArray< FString > &  FilterListItems,
bool  bIsFilteringDevelopmentAR,
bool  bUseAllowListInsteadOfDenyList 
)

Parses the list of CookedTagsBlacklist or CookedTagsWhitelist gathered from the INI. Returns a mapping from a tag to a list of rules. May contain unresolved rules.

◆ PrioritizeAssetInstall()

void UE::AssetRegistry::Utils::PrioritizeAssetInstall ( const FAssetData AssetData)

Hint the streaming installers to prioritize a specific asset for install.

◆ ReadAssetFile()

bool UE::AssetRegistry::Utils::ReadAssetFile ( FPackageReader PackageReader,
IAssetRegistry::FLoadPackageRegistryData InOutData 
)

Reads Asset file from a previously initialized package reader

Parameters
PackageReaderPreviously initialized package reader that maps to the data to be read
AssetDataListList of the read asset data

◆ ResolveFilterTags()

TMap< FTopLevelAssetPath, TSet< FName > > UE::AssetRegistry::Utils::ResolveFilterTags ( Impl::FFilterTagRules InOutRules,
bool  bSuppressWarnings 
)

Resolves and expands the list of rules to list of all derived loaded classes that satisfy those rules. Then transposes rules to a map with a class as a key and a list of tags as value.

◆ RunAssetsThroughFilter()

void UE::AssetRegistry::Utils::RunAssetsThroughFilter ( TArray< FAssetData > &  AssetDataList,
const FARCompiledFilter Filter,
const EFilterMode  FilterMode 
)

Given an array of asset data, trim the items that fail the filter based on the inclusion/exclusion mode used.

  • In inclusive mode it will remove all assets that fail the filter, and in exclusive mode it will remove all assets that pass the filter.
  • If the filter is empty, then the array will be untouched.

◆ RunAssetThroughFilter()

bool UE::AssetRegistry::Utils::RunAssetThroughFilter ( const FAssetData AssetData,
const FARCompiledFilter Filter,
const EFilterMode  FilterMode 
)

Report whether the given AssetData passes/fails the given filter

◆ RunAssetThroughFilter_Unchecked()

bool UE::AssetRegistry::Utils::RunAssetThroughFilter_Unchecked ( const FAssetData AssetData,
const FARCompiledFilter Filter,
const bool  bPassFilterValue 
)

Helper for RunAssetThroughFilter and RunAssetsThroughFilter that skips validity check

◆ UpdateSerializationOptions()

void UE::AssetRegistry::Utils::UpdateSerializationOptions ( FAssetRegistrySerializationOptions InOutOptions,
Impl::FFilterTagRules InOutFilterRules,
bool  bSuppressWarnings 
)

Updates FAssetRegistrySerializationOptions filters with the information based on runtime classes. Options are parsed based on class name and need to be resolved using the class hierarchy, and since the class hierarchy can change during startup we may need to reexecute the resolve.