IAssetRegistry

Windows
MacOS
Linux

References

Module

AssetRegistry

Header

/Engine/Source/Runtime/AssetRegistry/Public/IAssetRegistry.h

Include

#include "IAssetRegistry.h"

Syntax

class IAssetRegistry

Functions

Name Description

Public function

bool

 

AddPath

(
    const FString& PathToAdd
)

Adds the specified path to the set of cached paths.

Public function

void

 

AppendState

(
    const FAssetRegistryState& InState
)

Append the assets from the incoming state into our own

Public function

void

 

AssetCreated

(
    UObject* NewAsset
)

Informs the asset registry that an in-memory asset has been created

Public function

void

 

AssetDeleted

(
    UObject* DeletedAsset
)

Informs the asset registry that an in-memory asset has been deleted

Public function

void

 

AssetRenamed

(
    const UObject* RenamedAsset,
    const FString& OldObjectPath
)

Informs the asset registry that an in-memory asset has been renamed

Public function Const

bool

 

EnumerateAllAssets

(
    TFunctionRef< bool...,
    bool bIncludeOnlyOnDiskAssets
)

Enumerate asset data for all assets in the registry.

Public function Const

void

 

EnumerateAllCachedPaths

(
    TFunctionRef< bool)> Callback
)

Enumerate all the paths that are currently cached

Public function Const

void

 

EnumerateAllCachedPaths

(
    TFunctionRef< bool)> Callba...
)

Enumerate all the paths that are currently cached

Public function Const

bool

 

EnumerateAssets

(
    const FARFilter& Filter,
    TFunctionRef< bool...
)

Enumerate asset data for all assets that match the filter.

Public function Const

void

 

EnumerateSubPaths

(
    const FString& InBasePath,
    TFunctionRef< bool)> Callba...,
    bool bInRecurse
)

Enumerate the all paths that are currently cached below the passed-in base path

Public function Const

void

 

EnumerateSubPaths

(
    const FName InBasePath,
    TFunctionRef< bool)> Callback,
    bool bInRecurse
)

Enumerate the all paths that are currently cached below the passed-in base path

Public function Const

void

 

ExpandRecursiveFilter

(
    const FARFilter& InFilter,
    FARFilter& ExpandedFilter
)

Modifies passed in filter to make it safe for use on FAssetRegistryState.

Public function Const

bool

 

GetAllAssets

(
    TArray< FAssetData >& OutAssetData,
    bool bIncludeOnlyOnDiskAssets
)

Gets asset data for all assets in the registry.

Public function Const

void

 

GetAllCachedPaths

(
    TArray< FString >& OutPathList
)

Gets a list of all paths that are currently cached

Public function Const

uint32

 

GetAllocatedSize

(
    bool bLogDetailed
)

Returns memory size of entire registry, optionally logging sizes

Public function Const

bool

 

GetAncestorClassNames

(
    FName ClassName,
    TArray< FName >& OutAncestorClassN...
)

Returns true if the specified ClassName's ancestors could be found.

Public function Const

EAssetAvaila...

 

GetAssetAvailability

(
    const FAssetData& AssetData
)

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

Public function Const

float

 

GetAssetAvailabilityProgress

(
    const FAssetData& AssetData,
    EAssetAvailabilityProgressReporting...
)

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

Public function Const

bool

 

GetAssetAvailabilityProgressTypeSupported

Public function Const

FAssetData

 

GetAssetByObjectPath

(
    const FName ObjectPath,
    bool bIncludeOnlyOnDiskAssets
)

Gets the asset data for the specified object path

Public function Const

const FAsset...

 

GetAssetPackageData

(
    FName PackageName
)

Finds Package data for a package name.

Public function Const

const FAsset...

 

GetAssetRegistryState()

Returns read only reference to the current asset registry state.

Public function Const

bool

 

GetAssets

(
    const FARFilter& Filter,
    TArray< FAssetData >& OutAssetData
)

Gets asset data for all assets that match the filter.

Public function Const

bool

 

GetAssetsByClass

(
    FName ClassName,
    TArray< FAssetData >& OutAssetData,
    bool bSearchSubClasses
)

Gets asset data for all assets with the supplied class

Public function Const

bool

 

GetAssetsByPackageName

(
    FName PackageName,
    TArray< FAssetData >& OutAssetData,
    bool bIncludeOnlyOnDiskAssets
)

Gets asset data for the assets in the package with the specified package name

Public function Const

bool

 

GetAssetsByPath

(
    FName PackagePath,
    TArray< FAssetData >& OutAssetData,
    bool bRecursive,
    bool bIncludeOnlyOnDiskAssets
)

Gets asset data for all assets in the supplied folder path

Public function Const

bool

 

GetAssetsByTags

(
    const TArray< FName >& AssetTags,
    TArray< FAssetData >& OutAssetData
)

Gets asset data for all assets with the supplied tags, regardless of their value

Public function Const

bool

 

GetAssetsByTagValues

(
    const TMultiMap< FName, FString >&...,
    TArray< FAssetData >& OutAssetData
)

Gets asset data for all assets with the supplied tags and values

Protected function Const

const FAsset...

 

GetCachedAssetDataForObjectPath

(
    const FName ObjectPath
)

Returns pointer to cached AssetData for an object path.

Public function Const

const TSet< ...

 

GetCachedEmptyPackages()

Returns the set of empty package names fast iteration

Public function Const

bool

 

GetDependencies

(
    const FAssetIdentifier& AssetIdent...,
    TArray< FAssetIdentifier >& OutDep...,
    EAssetRegistryDependencyType::Type ...
)

Gets a list of packages and searchable names that are referenced by the supplied package or name.

Public function Const

bool

 

GetDependencies

(
    FName PackageName,
    TArray< FName >& OutDependencies,
    EAssetRegistryDependencyType::Type ...
)

Gets a list of paths to objects that are referenced by the supplied package.

Public function Const

void

 

GetDerivedClassNames

(
    const TArray< FName >& ClassNames,
    const TSet< FName >& ExcludedClass...,
    TSet< FName >& OutDerivedClassName...
)

Returns the names of all classes derived by the supplied class names, excluding any classes matching the excluded class names.

Public function Const

FName

 

GetRedirectedObjectPath

(
    const FName ObjectPath
)

Uses the asset registry to look for ObjectRedirectors.

Public function Const

bool

 

GetReferencers

(
    FName PackageName,
    TArray< FName >& OutReferencers,
    EAssetRegistryDependencyType::Type ...
)

Gets a list of packages that reference the supplied package. (On disk references ONLY)

Public function Const

bool

 

GetReferencers

(
    const FAssetIdentifier& AssetIdent...,
    TArray< FAssetIdentifier >& OutRef...,
    EAssetRegistryDependencyType::Type ...
)

Gets a list of packages and searchable names that reference the supplied package or name.

Public function Const

void

 

GetSubPaths

(
    const FString& InBasePath,
    TArray< FString >& OutPathList,
    bool bInRecurse
)

Gets a list of all paths that are currently cached below the passed-in base path

Public function Const

bool

 

GetTemporaryCachingMode()

Returns true if temporary caching mode enabled

Public function Const

bool

 

HasAssets

(
    const FName PackagePath,
    const bool bRecursive
)

Does the given path contain assets, optionally also testing sub-paths?

Public function Const

void

 

InitializeSerializationOptions

(
    FAssetRegistrySerializationOptions ...,
    const FString& PlatformIniName
)

Fills in FAssetRegistrySerializationOptions from ini, optionally using a target platform ini name

Public function Const

void

 

InitializeTemporaryAssetRegistryState

(
    FAssetRegistryState& OutState,
    const FAssetRegistrySerializationOp...,
    bool bRefreshExisting,
    const TMap< FName, FAssetData*...
)

Fills in a AssetRegistryState with a copy of the data in the internal cache, overriding some

Public function Const

bool

 

IsLoadingAssets()

Returns true if the asset registry is currently loading files and does not yet know about all assets

Public function Virtual Const

bool

 

K2_GetDependencies

(
    FName PackageName,
    const FAssetRegistryDependencyOptio...,
    TArray< FName >& OutDependencies
)

Gets a list of paths to objects that are referenced by the supplied package.

Public function Virtual Const

bool

 

K2_GetReferencers

(
    FName PackageName,
    const FAssetRegistryDependencyOptio...,
    TArray< FName >& OutReferencers
)

Gets a list of packages that reference the supplied package. (On disk references ONLY)

Public function Const

void

 

LoadPackageRegistryData

(
    FArchive& Ar,
    TArray< FAssetData* >& Data
)

Load FPackageRegistry data from the supplied package

Public function

FAssetAddedE...

 

OnAssetAdded()

Public function

FAssetRemove...

 

OnAssetRemoved()

Public function

FAssetRename...

 

OnAssetRenamed()

Public function

FAssetUpdate...

 

OnAssetUpdated()

Public function

FFileLoadPro...

 

OnFileLoadProgressUpdated()

Public function

FFilesLoaded...

 

OnFilesLoaded()

Public function

FInMemoryAss...

 

OnInMemoryAssetCreated()

Public function

FInMemoryAss...

 

OnInMemoryAssetDeleted()

Public function

FPathAddedEv...

 

OnPathAdded()

Public function

FPathRemoved...

 

OnPathRemoved()

Public function

void

 

PackageDeleted

(
    UPackage* DeletedPackage
)

Informs the asset registry that an in-memory package has been deleted, and all associated assets should be removed

Public function Const

void

 

PrioritizeAssetInstall

(
    const FAssetData& AssetData
)

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

Public function

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.

Public function

bool

 

RemovePath

(
    const FString& PathToRemove
)

Attempts to remove the specified path to the set of cached paths.

Public function Const

void

 

RunAssetsThroughFilter

(
    TArray< FAssetData >& AssetDataLis...,
    const FARFilter& Filter
)

Trims items out of the asset data list that do not pass the supplied filter

Public function

void

 

ScanFilesSynchronous

(
    const TArray< FString >& InFilePat...,
    bool bForceRescan
)

Scan the specified individual files right now and populate the asset registry.

Public function

void

 

ScanModifiedAssetFiles

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

Forces a rescan of specific filenames, call this when you need to refresh from disk

Public function

void

 

ScanPathsSynchronous

(
    const TArray< FString >& InPaths,
    bool bForceRescan
)

Scan the supplied paths recursively right now and populate the asset registry.

Public function

void

 

SearchAllAssets

(
    bool bSynchronousSearch
)

Look for all assets on disk (can be async or synchronous)

Public function

void

 

Serialize

(
    FArchive& Ar
)

Serialize the registry to/from a file, skipping editor only data

Public function

void

 

Serialize

(
    FStructuredArchive::FRecord Record
)

Protected function

void

 

SetManageReferences

(
    const TMultiMap< FAssetIdentifier, ...,
    bool bClearExisting,
    EAssetRegistryDependencyType::Type ...,
    ShouldSetManagerPredicate ShouldSet...
)

Specifies a list of manager mappings, optionally recursing to dependencies.

Protected function

bool

 

SetPrimaryAssetIdForObjectPath

(
    const FName ObjectPath,
    FPrimaryAssetId PrimaryAssetId
)

Sets the PrimaryAssetId for a specific asset.

Public function

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.

Public function

void

 

StripAssetRegistryKeyForObject

(
    FName ObjectPath,
    FName Key
)

Removes a key from the key value pairs for an object

Public function

void

 

Tick

(
    float DeltaTime
)

Tick the asset registry

Public function Const

void

 

UseFilterToExcludeAssets

(
    TArray< FAssetData >& AssetDataLis...,
    const FARFilter& Filter
)

Trims items out of the asset data list that do not pass the supplied filter

Classes

Name

Description

Public class

FAssetAddedEvent

Event for when assets are added to the registry

Public class

FAssetRemovedEvent

Event for when assets are removed from the registry

Public class

FAssetRenamedEvent

Event for when assets are renamed in the registry

Public class

FAssetUpdatedEvent

Event for when assets are updated in the registry

Public struct

FFileLoadProgressUpdateData

Payload data for a file progress update

Public class

FFileLoadProgressUpdatedEvent

Event to update the progress of the background file load

Public class

FFilesLoadedEvent

Event for when the asset registry is done loading files

Public class

FInMemoryAssetCreatedEvent

Event for when in-memory assets are created

Public class

FInMemoryAssetDeletedEvent

Event for when assets are deleted

Public class

FPathAddedEvent

Event for when paths are added to the registry

Public class

FPathRemovedEvent

Event for when paths are removed from the registry

Typedefs

Name

Description

ShouldSetManagerPredicate

Predicate called to decide rather to recurse into a reference when setting manager

Deprecated Functions

Name Description

Public function

void

 

LoadRegistryData

(
    FArchive& Ar,
    TMap< FName, FAssetData* >& D...
)

  1. Create a FAssetRegistryState and call Serialize on it directly

Public function

void

 

SaveRegistryData

(
    FArchive& Ar,
    TMap< FName, FAssetData* >& D...,
    TArray< FName >* InMaps
)

  1. Use InitializeTemporaryAssetRegistryState and call Serialize on it directly

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss