![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <AssetData.h>
Public Types | |
| enum class | ECreationFlags { None = 0 , SkipAssetRegistryTagsGathering = 1 << 0 , AllowBlueprintClass = 1 << 1 } |
| using | FChunkArray = TArray< int32, TInlineAllocator< 2 > > |
| using | FChunkArrayView = TConstArrayView< int32 > |
Static Public Member Functions | |
| static const TCHAR * | GetCollectionTagPrefix () |
| static COREUOBJECT_API SIZE_T | GetChunkArrayRegistryAllocatedSize () |
| static COREUOBJECT_API bool | IsUAsset (UObject *Object) |
| static COREUOBJECT_API bool | IsTopLevelAsset (UObject *Object) |
| static bool | IsRedirector (UObject *Object) |
| static FAssetData | GetFirstAssetDataOfClass (const TArray< FAssetData > &Assets, const UClass *DesiredClass) |
| template<class T > | |
| static T * | GetFirstAsset (const TArray< FAssetData > &Assets) |
| static COREUOBJECT_API bool | IsRedirectorClassName (FTopLevelAssetPath ClassPathName) |
| static COREUOBJECT_API FTopLevelAssetPath | TryConvertShortClassNameToPathName (FName InClassName, ELogVerbosity::Type FailureMessageVerbosity=ELogVerbosity::Warning) |
Friends | |
| UE_FORCEINLINE_HINT uint32 | GetTypeHash (const FAssetData &AssetData) |
A struct to hold important information about an assets found by the Asset Registry This struct is transient and should never be serialized
| using FAssetData::FChunkArray = TArray<int32, TInlineAllocator<2> > |
|
strong |
|
inline |
Default constructors.
|
default |
|
default |
| FAssetData::FAssetData | ( | FName | InPackageName, |
| FName | InPackagePath, | ||
| FName | InAssetName, | ||
| FName | InAssetClassName, | ||
| FAssetDataTagMap | InTags = FAssetDataTagMap(), |
||
| TArrayView< const int32 > | InChunkIDs = TArrayView<const int32>(), |
||
| uint32 | InPackageFlags = 0 |
||
| ) |
| FAssetData::FAssetData | ( | const FString & | InLongPackageName, |
| const FString & | InObjectPath, | ||
| FName | InAssetClassName, | ||
| FAssetDataTagMap | InTags = FAssetDataTagMap(), |
||
| TArrayView< const int32 > | InChunkIDs = TArrayView<const int32>(), |
||
| uint32 | InPackageFlags = 0 |
||
| ) |
| FAssetData::FAssetData | ( | FName | InPackageName, |
| FName | InPackagePath, | ||
| FName | InAssetName, | ||
| FTopLevelAssetPath | InAssetClassPathName, | ||
| FAssetDataTagMap | InTags = FAssetDataTagMap(), |
||
| TArrayView< const int32 > | InChunkIDs = TArrayView<const int32>(), |
||
| uint32 | InPackageFlags = 0 |
||
| ) |
Constructor building the ObjectPath in the form of InPackageName.InAssetName. does not work for object outer-ed to a different package.
| FAssetData::FAssetData | ( | const FString & | InLongPackageName, |
| const FString & | InObjectPath, | ||
| FTopLevelAssetPath | InAssetClassPathName, | ||
| FAssetDataTagMap | InTags = FAssetDataTagMap(), |
||
| TArrayView< const int32 > | InChunkIDs = TArrayView<const int32>(), |
||
| uint32 | InPackageFlags = 0 |
||
| ) |
Constructor with a long package name and a full object path which might not be part of the package this asset is in.
| FAssetData::FAssetData | ( | const UObject * | InAsset, |
| FAssetData::ECreationFlags | InCreationFlags = ECreationFlags::None |
||
| ) |
Constructor taking a UObject. By default trying to create one for a blueprint class will create one for the UBlueprint instead, but this can be overridden
| FAssetData::FAssetData | ( | const UObject * | InAsset, |
| FAssetData::ECreationFlags | InCreationFlags, | ||
| EAssetRegistryTagsCaller | Caller | ||
| ) |
Constructor taking a UObject. By default trying to create one for a blueprint class will create one for the UBlueprint instead, but this can be overridden
|
inline |
Append the object path to the given string.
|
inline |
Append the object path to the given string builder.
| void FAssetData::ClearChunkIDs | ( | ) |
Call the given function for each tag on the asset. Function signature is: void Fn(TPair<FName, FAssetTagValueRef>);
Returns the asset UObject if it is loaded or loads the asset if it is unloaded then returns the result
Note this can return nullptr even if it looks like the asset exists because it doesn't handle redirects.
| bLoad | (optional) loads the asset if it is unloaded. |
| LoadTags | (optional) allows passing specific tags to the linker when loading the asset ( |
Returns the asset UObject if it is loaded or loads the asset if it is unloaded then returns the result
Note this can return nullptr even if it looks like the asset exists because it doesn't handle redirects.
| LoadTags | (optional) allows passing specific tags to the linker when loading the asset ( |
|
inline |
Returns how package can be referenced from other plugins and mount points
|
static |
Returns overhead of the chunk array registry that's used to manage chunk ID arrays.
| FAssetData::FChunkArrayView FAssetData::GetChunkIDs | ( | ) | const |
| UClass * FAssetData::GetClass | ( | EResolveClass | ResolveClass = EResolveClass::No | ) | const |
Returns the class UClass if it is loaded. If you choose to override ResolveClass, to EResolveClass::Yes it will attempt to load the class if unloaded.
The prefix used for collection entries inside TagsAndValues
|
inline |
Returns the name for the asset in the form: Class'FullPath'
|
inline |
Populates OutExportTextName with the name for the asset in the form: Class'FullPath'
|
inline |
Populates OutExportTextNameBuilder with the name for the asset in the form: Class'FullPath'
|
inlinestatic |
Convenience template for finding first asset of a class
|
inlinestatic |
Get the first FAssetData of a particular class from an Array of FAssetData
|
inline |
Returns the full name for the asset in the form: Class FullPath
|
inline |
Populates OutFullName with the full name for the asset in the form: Class FullPath
|
inline |
Populates OutFullNameBuilder with the full name for the asset in the form: Class ObjectPath
|
inline |
Return the object path as a string.
|
inline |
Tries to find the package in memory if it is loaded, otherwise loads it.
| FPrimaryAssetId FAssetData::GetPrimaryAssetId | ( | ) | const |
Gets primary asset id of this data
| FSoftObjectPath FAssetData::GetSoftObjectPath | ( | ) | const |
Convert to a SoftObjectPath. PackageName.AssetName for ToplevelAssets. OptionalOuterName and AssetName joined by : or . for sub-object assets
|
inline |
Try and get the value associated with the given tag as a type converted value
Try and get the value associated with the given tag as a type converted value, or an empty value if it doesn't exist
|
inline |
|
inline |
| UE::Core::FVersePath FAssetData::GetVersePath | ( | ) | const |
Gets the versepath of the asset.
Used to check whether all of the passed flags are set in the cached asset package flags.
| FlagsToCheck | Package flags to check for |
Used to check whether the any of the passed flags are set in the cached asset package flags.
| FlagsToCheck | Package flags to check for |
| bool FAssetData::HasSameChunkIDs | ( | const FAssetData & | OtherAssetData | ) | const |
|
inline |
Returns true if the asset is loaded
|
inline |
Returns whether the Asset's class is equal to or a child class of the given class. Returns false if the Asset's class can not be loaded. If you choose to override ResolveClass, to EResolveClass::Yes it will attempt to load the class if unloaded.
|
inline |
|
inline |
Returns true if the this asset is a redirector.
|
static |
| bool FAssetData::IsTopLevelAsset | ( | ) | const |
Returns true iff the Asset is a TopLevelAsset (not a subobject, its outer is a UPackage). Only TopLevelAssets can be PrimaryAssets in the AssetManager. A TopLevelAsset is not necessarily the main asset in a package; see IsUAsset. Note that this is distinct from UObject::IsAsset because IsAsset can be overloaded (see e.g. AActor::IsAsset)
Returns true iff the given Object, assumed to be an Asset, is a TopLevelAsset (not a subobject, its outer is a UPackage). Only TopLevelAssets can be PrimaryAssets in the AssetManager. A TopLevelAsset is not necessarily the main asset in a package; see IsUAsset.
|
inline |
Returns true if this is the main asset in a package, true for maps and assets but false for secondary objects like class redirectors Every UAsset is also a TopLevelAsset. Specifically, this is just testing whether the asset name matches the package name, and it is possible for legacy content to not return true for any asset in a package.
Returns true if the given UObject is the main asset in a package, true for maps and assets but false for secondary objects like class redirectors Every UAsset is also a TopLevelAsset.
|
inline |
Checks to see if this AssetData refers to an asset or is NULL
|
inline |
|
inline |
Perform a lexical less-than operation on the PackageName and AssetName that uniquely identify two FAssetData.
|
default |
|
default |
|
inline |
FAssetDatas are uniquely identified by PackageName and AssetName.
|
inline |
Perform a lexical greater-than operation on the PackageName and AssetName that uniquely identify two FAssetData.
|
inline |
Prints the details of the asset to the log
|
inline |
Serialize as part of the registry cache. This is not meant to be serialized as part of a package so it does not handle versions normally To version this data change FAssetRegistryVersion
|
inline |
Serialize as part of the registry cache using legacy paths (versioned)
| void FAssetData::SetChunkIDs | ( | const FChunkArrayView & | InChunkIDs | ) |
| void FAssetData::SetChunkIDs | ( | FChunkArray && | InChunkIDs | ) |
| void FAssetData::SetTagsAndAssetBundles | ( | FAssetDataTagMap && | Tags | ) |
|
inline |
|
inline |
|
static |
Helper function that tries to convert short class name to path name
| bool FAssetData::TryNetworkRead | ( | FCbFieldView | Field, |
| bool | bReadPackageName, | ||
| FName | InPackageName | ||
| ) |
|
friend |
| FName FAssetData::AssetClass |
The name of the asset's class
| FTopLevelAssetPath FAssetData::AssetClassPath |
The path of the asset's class, e.g. /Script/Engine.StaticMesh
| FName FAssetData::AssetName |
The name of the asset without the package
| TArray<int32, TInlineAllocator<2> > FAssetData::ChunkIDs |
The IDs of the pakchunks this asset is located in for streaming install. Empty if not assigned to a chunk
| uint32 FAssetData::PackageFlags = 0 |
Asset package flags
| FName FAssetData::PackageName |
The name of the package in which the asset is found, this is the full long package name such as /Game/Path/Package
| FName FAssetData::PackagePath |
The path to the package in which the asset is found, this is /Game/Path with the Package stripped off
| TSharedPtr<FAssetBundleData, ESPMode::ThreadSafe> FAssetData::TaggedAssetBundles |
The 'AssetBundles' tag key is separated from TagsAndValues and typed for performance reasons. This is likely a temporary solution that will be generalized in some other fashion.
| FAssetDataTagMapSharedView FAssetData::TagsAndValues |
The map of values for properties that were marked AssetRegistrySearchable or added by GetAssetRegistryTags