Navigation
API > API/Runtime > API/Runtime/CoreUObject > API/Runtime/CoreUObject/AssetRegistry
References
| Module | CoreUObject |
| Header | /Engine/Source/Runtime/CoreUObject/Public/AssetRegistry/AssetData.h |
| Include | #include "AssetRegistry/AssetData.h" |
Syntax
struct FAssetData
Remarks
A struct to hold important information about an assets found by the Asset Registry This struct is transient and should never be serialized
Variables
| Type | Name | Description | |
|---|---|---|---|
| FTopLevelAssetPath | AssetClassPath | The path of the asset's class, e.g. /Script/Engine.StaticMesh | |
| FName | AssetName | The name of the asset without the package | |
| uint32 | PackageFlags | Asset package flags | |
| FName | 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 | 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 > | TaggedAssetBundles | The 'AssetBundles' tag key is separated from TagsAndValues and typed for performance reasons. | |
| FAssetDataTagMapSharedView | TagsAndValues | The map of values for properties that were marked AssetRegistrySearchable or added by GetAssetRegistryTags |
Constructors
| Type | Name | Description | |
|---|---|---|---|
| PRAGMA_DISABLE_DEPRECATION_WARNINGS | FAssetData () |
Default constructors. | |
FAssetData
(
FAssetData&& |
|||
FAssetData
(
const FAssetData& |
|||
FAssetData
(
const UObject* InAsset, |
Constructor taking a UObject. | ||
FAssetData
(
const UObject* InAsset, |
Constructor taking a UObject. | ||
FAssetData
(
const FString& InLongPackageName, |
Class names are now represented by path names. Please use a version of FAssetData constructor that uses FTopLevelAssetPath. | ||
FAssetData
(
const FString& InLongPackageName, |
Constructor with a long package name and a full object path which might not be part of the package this asset is in. | ||
FAssetData
(
FName InPackageName, |
Class names are now represented by path names. Please use a version of FAssetData constructor that uses FTopLevelAssetPath. | ||
FAssetData
(
FName InPackageName, |
Constructor building the ObjectPath in the form of InPackageName.InAssetName. |
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | AddChunkID
(
int32 ChunkID |
||
| void | AppendObjectPath
(
FString& String |
Append the object path to the given string. | |
| void | AppendObjectPath
(
FStringBuilderBase& Builder |
Append the object path to the given string builder. | |
| void | |||
| void | EnumerateTags
(
Func Fn |
Call the given function for each tag on the asset. | |
| UObject * | FastGetAsset
(
bool bLoad, |
Returns the asset UObject if it is loaded or loads the asset if it is unloaded then returns the result | |
| bool | Try to find the given tag | ||
| UObject * | Returns the asset UObject if it is loaded or loads the asset if it is unloaded then returns the result | ||
| SIZE_T | Returns overhead of the chunk array registry that's used to manage chunk ID arrays. | ||
| FChunkArrayView | GetChunkIDs () |
||
| UClass * | GetClass
(
EResolveClass ResolveClass |
Returns the class UClass if it is loaded. | |
| const TCHAR * | The prefix used for collection entries inside TagsAndValues | ||
| void | GetExportTextName
(
FStringBuilderBase& OutExportTextNameBuilder |
Populates OutExportTextNameBuilder with the name for the asset in the form: Class'FullPath' | |
| void | GetExportTextName
(
FString& OutExportTextName |
Populates OutExportTextName with the name for the asset in the form: Class'FullPath' | |
| FString | Returns the name for the asset in the form: Class'FullPath' | ||
| T * | GetFirstAsset
(
const TArray< FAssetData >& Assets |
Convenience template for finding first asset of a class | |
| FAssetData | GetFirstAssetDataOfClass
(
const TArray< FAssetData >& Assets, |
Get the first FAssetData of a particular class from an Array of FAssetData | |
| void | GetFullName
(
FString& OutFullName |
Populates OutFullName with the full name for the asset in the form: Class FullPath | |
| void | GetFullName
(
FStringBuilderBase& OutFullNameBuilder |
Populates OutFullNameBuilder with the full name for the asset in the form: Class ObjectPath | |
| FString | GetFullName () |
Returns the full name for the asset in the form: Class FullPath | |
| FString | Return the object path as a string. | ||
| FName | |||
| UPackage * | GetPackage () |
Tries to find the package in memory if it is loaded, otherwise loads it. | |
| FPrimaryAssetId | Gets primary asset id of this data | ||
| FSoftObjectPath | Convert to a SoftObjectPath. | ||
| bool | GetTagValue
(
FName Tag, |
||
| bool | GetTagValue
(
FName Tag, |
||
| bool | GetTagValue
(
FName Tag, |
||
| bool | GetTagValue
(
FName Tag, |
Try and get the value associated with the given tag as a type converted value | |
| FAssetRegistryExportPath | GetTagValueRef
(
FName Tag |
||
| FName | GetTagValueRef
(
FName Tag |
||
| FText | GetTagValueRef
(
FName Tag |
||
| FString | GetTagValueRef
(
FName Tag |
||
| ValueType | GetTagValueRef
(
const FName Tag |
Try and get the value associated with the given tag as a type converted value, or an empty value if it doesn't exist | |
| bool | HasAllPackageFlags
(
uint32 FlagsToCheck |
Used to check whether all of the passed flags are set in the cached asset package flags. | |
| bool | HasAnyPackageFlags
(
uint32 FlagsToCheck |
Used to check whether the any of the passed flags are set in the cached asset package flags. | |
| bool | HasSameChunkIDs
(
const FAssetData& OtherAssetData |
||
| bool | Returns true if the asset is loaded | ||
| bool | IsInstanceOf
(
const UClass* BaseClass, |
Returns whether the Asset's class is equal to or a child class of the given class. | |
| bool | IsInstanceOf
(
EResolveClass ResolveClass |
||
| bool | IsRedirector
(
UObject* Object |
||
| bool | IsRedirector () |
Returns true if the this asset is a redirector. | |
| bool | IsRedirectorClassName
(
FTopLevelAssetPath ClassPathName |
||
| bool | Returns true iff the Asset is a TopLevelAsset (not a subobject, its outer is a UPackage). | ||
| bool | IsTopLevelAsset
(
UObject* Object |
Returns true iff the given Object, assumed to be an Asset, is a TopLevelAsset (not a subobject, its outer is a UPackage). | |
| bool | 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. | ||
| bool | IsUAsset () |
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. | |
| bool | IsValid () |
Checks to see if this AssetData refers to an asset or is NULL | |
| void | NetworkWrite
(
FCbWriter& Writer, |
Note: these functions should only be used for live communication between processing running the same version of the engine. | |
| void | Prints the details of the asset to the log | ||
| void | SerializeForCache
(
Archive&& Ar |
Serialize as part of the registry cache. | |
| void | SerializeForCacheOldVersion
(
Archive&& Ar, |
Serialize as part of the registry cache using legacy paths (versioned) | |
| void | SetChunkIDs
(
const FChunkArrayView& InChunkIDs |
||
| void | SetChunkIDs
(
FChunkArray&& InChunkIDs |
||
| void | SetOptionalOuterPathName
(
FName InName |
||
| void | SetTagsAndAssetBundles
(
FAssetDataTagMap&& Tags |
||
| void | Shrink () |
||
| FSoftObjectPath | TODO: Deprecate in favor of GetSoftObjectPath. | ||
| FTopLevelAssetPath | TryConvertShortClassNameToPathName
(
FName InClassName, |
Helper function that tries to convert short class name to path name | |
| bool | TryNetworkRead
(
FCbFieldView Field, |
Operators
| Type | Name | Description | |
|---|---|---|---|
| bool | operator!=
(
const FAssetData& Other |
||
| bool | operator<
(
const FAssetData& Other |
Perform a lexical less-than operation on the PackageName and AssetName that uniquely identify two FAssetData. | |
| FAssetData & | operator=
(
FAssetData&& |
||
| FAssetData & | operator=
(
const FAssetData& |
||
| bool | operator==
(
const FAssetData& Other |
FAssetDatas are uniquely identified by PackageName and AssetName. | |
| bool | operator>
(
const FAssetData& Other |
Perform a lexical greater-than operation on the PackageName and AssetName that uniquely identify two FAssetData. |
Enums
| Type | Name | Description | |
|---|---|---|---|
| ECreationFlags |
Typedefs
| Name | Description |
|---|---|
| FChunkArray | These are usually very small arrays and we can preallocate two elements for the same cost as one on 64-bit systems. |
| FChunkArrayView |
Deprecated Variables
| Type | Name | Description | |
|---|---|---|---|
| FName | AssetClass | Class names are now represented by path names. Please use AssetClassPath. | |
| TArray< int32, TInlineAllocator< 2 > > | ChunkIDs | Use SetChunkIDs/GetChunkIDs/AddChunkID instead. | |
| FName | ObjectPath | FName asset paths have been deprecated. Use GetSoftObjectPath to get the path this asset will use in memory when loaded or GetObjectPathString() if you were just doing ObjectPath.ToString() |
Deprecated Functions
| Type | Name | Description | |
|---|---|---|---|
FAssetData
(
FName InPackageName, |
Class names are now represented by path names. Please use a version of FAssetData constructor that uses FTopLevelAssetPath. | ||
FAssetData
(
const FString& InLongPackageName, |
Class names are now represented by path names. Please use a version of FAssetData constructor that uses FTopLevelAssetPath. |