Navigation
API > API/Runtime > API/Runtime/CoreUObject
A struct to hold important information about an assets found by the Asset Registry This struct is transient and should never be serialized
| Name | FAssetData |
| Type | struct |
| Header File | /Engine/Source/Runtime/CoreUObject/Public/AssetRegistry/AssetData.h |
| Include Path | #include "AssetRegistry/AssetData.h" |
Syntax
USTRUCT (BlueprintType )
struct FAssetData
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FAssetData
(
const FString& InLongPackageName, |
AssetRegistry/AssetData.h | ||
FAssetData
(
const UObject* InAsset, |
AssetRegistry/AssetData.h | ||
FAssetData
(
const UObject* InAsset, |
Constructor taking a UObject. | AssetRegistry/AssetData.h | |
FAssetData
(
const UObject* InAsset, |
Constructor taking a UObject. | AssetRegistry/AssetData.h | |
FAssetData
(
const FAssetData& |
AssetRegistry/AssetData.h | ||
FAssetData
(
FAssetData&& |
AssetRegistry/AssetData.h | ||
PRAGMA_DISABLE_DEPRECATION_WARNINGS FAssetData () |
Default constructors. | AssetRegistry/AssetData.h | |
FAssetData
(
FName InPackageName, |
Constructor building the ObjectPath in the form of InPackageName.InAssetName. | AssetRegistry/AssetData.h | |
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. | AssetRegistry/AssetData.h | |
FAssetData
(
FName InPackageName, |
AssetRegistry/AssetData.h |
Enums
Public
| Name | Remarks |
|---|---|
| ECreationFlags |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FChunkArray | TArray< int32, TInlineAllocator< 2 > > | These are usually very small arrays and we can preallocate two elements for the same cost as one on 64-bit systems. | AssetRegistry/AssetData.h |
| FChunkArrayView | TConstArrayView< int32 > | AssetRegistry/AssetData.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| AssetClass | FName | The name of the asset's class | AssetRegistry/AssetData.h |
|
| AssetClassPath | FTopLevelAssetPath | The path of the asset's class, e.g. /Script/Engine.StaticMesh | AssetRegistry/AssetData.h |
|
| AssetName | FName | The name of the asset without the package | AssetRegistry/AssetData.h |
|
| ChunkIDs | TArray< int32, TInlineAllocator< 2 > > | The IDs of the pakchunks this asset is located in for streaming install. | AssetRegistry/AssetData.h | |
| ObjectPath | FName | The object path for the asset in the form PackageName.ObjectName, or PackageName.ObjectName:SubObjectName. | AssetRegistry/AssetData.h | |
| PackageFlags | uint32 | Asset package flags | AssetRegistry/AssetData.h | |
| PackageName | FName | The name of the package in which the asset is found, this is the full long package name such as /Game/Path/Package | AssetRegistry/AssetData.h |
|
| PackagePath | FName | The path to the package in which the asset is found, this is /Game/Path with the Package stripped off | AssetRegistry/AssetData.h |
|
| TaggedAssetBundles | TSharedPtr< FAssetBundleData, ESPMode::ThreadSafe > | The 'AssetBundles' tag key is separated from TagsAndValues and typed for performance reasons. | AssetRegistry/AssetData.h | |
| TagsAndValues | FAssetDataTagMapSharedView | The map of values for properties that were marked AssetRegistrySearchable or added by GetAssetRegistryTags | AssetRegistry/AssetData.h |
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| ChunkArrayRegistryHandle | UE::AssetRegistry::FChunkArrayRegistryHandle | AssetRegistry/AssetData.h | ||
| OptionalOuterPath | FName | If this object is not a top level asset, this contains the path of the outer of this object. | AssetRegistry/AssetData.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AddChunkID
(
int32 ChunkID |
AssetRegistry/AssetData.h | ||
void AppendObjectPath
(
FString& String |
Append the object path to the given string. | AssetRegistry/AssetData.h | |
void AppendObjectPath
(
FStringBuilderBase& Builder |
Append the object path to the given string builder. | AssetRegistry/AssetData.h | |
void ClearChunkIDs() |
AssetRegistry/AssetData.h | ||
void EnumerateTags
(
Func Fn |
Call the given function for each tag on the asset. | AssetRegistry/AssetData.h | |
UObject * FastGetAsset
(
bool bLoad, |
Returns the asset UObject if it is loaded or loads the asset if it is unloaded then returns the result | AssetRegistry/AssetData.h | |
bool FindTag
(
const FName InTagName |
Try to find the given tag | AssetRegistry/AssetData.h | |
| Returns the asset UObject if it is loaded or loads the asset if it is unloaded then returns the result | AssetRegistry/AssetData.h | ||
EAssetAccessSpecifier GetAssetAccessSpecifier() |
Returns how package can be referenced from other plugins and mount points | AssetRegistry/AssetData.h | |
FChunkArrayView GetChunkIDs() |
AssetRegistry/AssetData.h | ||
UClass * GetClass
(
EResolveClass ResolveClass |
Returns the class UClass if it is loaded. | AssetRegistry/AssetData.h | |
void GetExportTextName
(
FStringBuilderBase& OutExportTextNameBuilder |
Populates OutExportTextNameBuilder with the name for the asset in the form: Class'FullPath' | AssetRegistry/AssetData.h | |
| Returns the name for the asset in the form: Class'FullPath' | AssetRegistry/AssetData.h | ||
void GetExportTextName
(
FString& OutExportTextName |
Populates OutExportTextName with the name for the asset in the form: Class'FullPath' | AssetRegistry/AssetData.h | |
void GetFullName
(
FString& OutFullName |
Populates OutFullName with the full name for the asset in the form: Class FullPath | AssetRegistry/AssetData.h | |
| Returns the full name for the asset in the form: Class FullPath | AssetRegistry/AssetData.h | ||
void GetFullName
(
FStringBuilderBase& OutFullNameBuilder |
Populates OutFullNameBuilder with the full name for the asset in the form: Class ObjectPath | AssetRegistry/AssetData.h | |
FString GetObjectPathString() |
Return the object path as a string. | AssetRegistry/AssetData.h | |
FName GetOptionalOuterPathName() |
AssetRegistry/AssetData.h | ||
UPackage * GetPackage() |
Tries to find the package in memory if it is loaded, otherwise loads it. | AssetRegistry/AssetData.h | |
FPrimaryAssetId GetPrimaryAssetId() |
Gets primary asset id of this data | AssetRegistry/AssetData.h | |
| Convert to a SoftObjectPath. | AssetRegistry/AssetData.h | ||
bool GetTagValue
(
FName Tag, |
Try and get the value associated with the given tag as a type converted value | AssetRegistry/AssetData.h | |
bool GetTagValue
(
FName Tag, |
AssetRegistry/AssetData.h | ||
bool GetTagValue
(
FName Tag, |
AssetRegistry/AssetData.h | ||
bool GetTagValue
(
FName Tag, |
AssetRegistry/AssetData.h | ||
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 | AssetRegistry/AssetData.h | |
FString GetTagValueRef
(
FName Tag |
AssetRegistry/AssetData.h | ||
FText GetTagValueRef
(
FName Tag |
AssetRegistry/AssetData.h | ||
FName GetTagValueRef
(
FName Tag |
AssetRegistry/AssetData.h | ||
FAssetRegistryExportPath GetTagValueRef
(
FName Tag |
AssetRegistry/AssetData.h | ||
UE::Core::FVersePath GetVersePath() |
Gets the versepath of the asset. | AssetRegistry/AssetData.h | |
bool HasAllPackageFlags
(
uint32 FlagsToCheck |
Used to check whether all of the passed flags are set in the cached asset package flags. | AssetRegistry/AssetData.h | |
bool HasAnyPackageFlags
(
uint32 FlagsToCheck |
Used to check whether the any of the passed flags are set in the cached asset package flags. | AssetRegistry/AssetData.h | |
bool HasSameChunkIDs
(
const FAssetData& OtherAssetData |
AssetRegistry/AssetData.h | ||
bool IsAssetLoaded() |
Returns true if the asset is loaded | AssetRegistry/AssetData.h | |
bool IsInstanceOf
(
EResolveClass ResolveClass |
AssetRegistry/AssetData.h | ||
bool IsInstanceOf
(
const UClass* BaseClass, |
Returns whether the Asset's class is equal to or a child class of the given class. | AssetRegistry/AssetData.h | |
bool IsRedirector () |
Returns true if the this asset is a redirector. | AssetRegistry/AssetData.h | |
bool IsTopLevelAsset () |
Returns true iff the Asset is a TopLevelAsset (not a subobject, its outer is a UPackage). | AssetRegistry/AssetData.h | |
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. | AssetRegistry/AssetData.h | |
bool IsValid() |
Checks to see if this AssetData refers to an asset or is NULL | AssetRegistry/AssetData.h | |
void NetworkWrite
(
FCbWriter& Writer, |
Note: these functions should only be used for live communication between processes running the same version of the engine. | AssetRegistry/AssetData.h | |
void PrintAssetData() |
Prints the details of the asset to the log | AssetRegistry/AssetData.h | |
void SerializeForCache
(
Archive&& Ar |
Serialize as part of the registry cache. | AssetRegistry/AssetData.h | |
void SerializeForCacheOldVersion
(
Archive&& Ar, |
Serialize as part of the registry cache using legacy paths (versioned) | AssetRegistry/AssetData.h | |
void SetChunkIDs
(
const FChunkArrayView& InChunkIDs |
AssetRegistry/AssetData.h | ||
void SetChunkIDs
(
FChunkArray&& InChunkIDs |
AssetRegistry/AssetData.h | ||
void SetOptionalOuterPathName
(
FName InName |
AssetRegistry/AssetData.h | ||
void SetTagsAndAssetBundles
(
FAssetDataTagMap&& Tags |
AssetRegistry/AssetData.h | ||
void Shrink() |
AssetRegistry/AssetData.h | ||
FSoftObjectPath ToSoftObjectPath() |
TODO: Deprecate in favor of GetSoftObjectPath. | AssetRegistry/AssetData.h | |
bool TryNetworkRead
(
FCbFieldView Field, |
AssetRegistry/AssetData.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static bool DetectIsUAssetByNames
(
FStringView PackageName, |
AssetRegistry/AssetData.h | ||
static SIZE_T GetChunkArrayRegistryAllocatedSize() |
Returns overhead of the chunk array registry that's used to manage chunk ID arrays. | AssetRegistry/AssetData.h | |
static const TCHAR * GetCollectionTagPrefix() |
The prefix used for collection entries inside TagsAndValues | AssetRegistry/AssetData.h | |
static T * GetFirstAsset
(
const TArray< FAssetData >& Assets |
Convenience template for finding first asset of a class | AssetRegistry/AssetData.h | |
static FAssetData GetFirstAssetDataOfClass
(
const TArray< FAssetData >& Assets, |
Get the first FAssetData of a particular class from an Array of FAssetData | AssetRegistry/AssetData.h | |
static bool IsRedirector
(
UObject* Object |
AssetRegistry/AssetData.h | ||
static bool IsRedirectorClassName
(
FTopLevelAssetPath ClassPathName |
AssetRegistry/AssetData.h | ||
static 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). | AssetRegistry/AssetData.h | |
| 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. | AssetRegistry/AssetData.h | ||
static FTopLevelAssetPath TryConvertShortClassNameToPathName
(
FName InClassName, |
Helper function that tries to convert short class name to path name | AssetRegistry/AssetData.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool operator!=
(
const FAssetData& Other |
AssetRegistry/AssetData.h | ||
FAssetData & operator=
(
const FAssetData& |
AssetRegistry/AssetData.h | ||
FAssetData & operator=
(
FAssetData&& |
AssetRegistry/AssetData.h | ||
bool operator==
(
const FAssetData& Other |
FAssetDatas are uniquely identified by PackageName and AssetName. | AssetRegistry/AssetData.h | |
bool operator>
(
const FAssetData& Other |
Perform a lexical greater-than operation on the PackageName and AssetName that uniquely identify two FAssetData. | AssetRegistry/AssetData.h |