FAssetData

A struct to hold important information about an assets found by the Asset Registry This struct is transient and should never be serialized

Windows
MacOS
Linux

References

Module

AssetRegistry

Header

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

Include

#include "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

Name Description

Public variable

FName

 

AssetClass

The name of the asset's class

Public variable

FName

 

AssetName

The name of the asset without the package

Public variable

TArray< int32 >

 

ChunkIDs

The IDs of the pakchunks this asset is located in for streaming install.

Public variable

FName

 

ObjectPath

The object path for the asset in the form PackageName.AssetName.

Public variable

uint32

 

PackageFlags

Asset package flags

Public variable

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

Public variable

FName

 

PackagePath

The path to the package in which the asset is found, this is /Game/Path with the Package stripped off

Public variable

FAssetDataTagMa...

 

TagsAndValues

The map of values for properties that were marked AssetRegistrySearchable or added by GetAssetRegistryTags

Constructors

Name Description

Public function

FAssetData()

Default constructor

Public function

FAssetData

(
    const UObject* InAsset,
    bool bAllowBlueprintClass
)

Constructor taking a UObject.

Public function

FAssetData

(
    FName InPackageName,
    FName InPackagePath,
    FName InAssetName,
    FName InAssetClass,
    FAssetDataTagMap InTags,
    TArray< int32 > InChunkIDs,
    uint32 InPackageFlags
)

Constructor

Functions

Name Description

Public function Const

UObject *...

 

FastGetAsset

(
    bool bLoad
)

Returns the asset UObject if it is loaded or loads the asset if it is unloaded then returns the result

Public function Const

UObject *...

 

GetAsset()

Returns the asset UObject if it is loaded or loads the asset if it is unloaded then returns the result

Public function Const

UClass *

 

GetClass()

Returns the class UClass if it is loaded.

Public function Static

const TCHAR ...

 

GetCollectionTagPrefix()

The prefix used for collection entries inside TagsAndValues

Public function Const

FString

 

GetExportTextName()

Returns the name for the asset in the form: Class'ObjectPath'

Public function Const

void

 

GetExportTextName

(
    FString& OutExportTextName
)

Populates OutExportTextName with the name for the asset in the form: Class'ObjectPath'

Public function Static

T *

 

GetFirstAsset

(
    const TArray< FAssetData >& Assets
)

Convenience template for finding first asset of a class

Public function Static

FAssetData

 

GetFirstAssetDataOfClass

(
    const TArray< FAssetData >& Assets,
    const UClass* DesiredClass
)

Get the first FAssetData of a particular class from an Array of FAssetData

Public function Const

FString

 

GetFullName()

Returns the full name for the asset in the form: Class ObjectPath

Public function Const

void

 

GetFullName

(
    FString& OutFullName
)

Populates OutFullName with the full name for the asset in the form: Class ObjectPath

Public function Const

UPackage ...

 

GetPackage()

Public function Const

FPrimaryAsse...

 

GetPrimaryAssetId()

Gets primary asset id of this data

Public function Const

bool

 

GetTagValue

(
    const FName InTagName,
    FString& OutTagValue
)

Public function Const

bool

 

GetTagValue

(
    const FName InTagName,
    FText& OutTagValue
)

Public function Const

bool

 

GetTagValue

(
    const FName InTagName,
    ValueType& OutTagValue
)

Try and get the value associated with the given tag as a type converted value

Public function Const

bool

 

GetTagValue

(
    const FName InTagName,
    FName& OutTagValue
)

Public function Const

ValueType

 

GetTagValueRef

(
    const FName InTagName
)

Try and get the value associated with the given tag as a type converted value, or an empty value if it doesn't exist

Public function Const

FString

 

GetTagValueRef

(
    const FName InTagName
)

Public function Const

FName

 

GetTagValueRef

(
    const FName InTagName
)

Public function Const

FText

 

GetTagValueRef

(
    const FName InTagName
)

Public function Const

bool

 

IsAssetLoaded()

Returns true if the asset is loaded

Public function Const

bool

 

IsRedirector()

Returns true if the this asset is a redirector.

Public function Const

bool

 

IsUAsset()

Returns true if this is the primary asset in a package, true for maps and assets but false for secondary objects like class redirectors

Public function Const

bool

 

IsValid()

Checks to see if this AssetData refers to an asset or is NULL

Public function Const

void

 

PrintAssetData()

Prints the details of the asset to the log

Public function

void

 

SerializeForCache

(
    FArchive& Ar
)

Serialize as part of the registry cache.

Public function

void

 

Shrink()

Public function Const

FSoftObjectP...

 

ToSoftObjectPath()

Convert to a SoftObjectPath for loading

Operators

Name Description

Public function Const

bool

 

operator!=

(
    const FAssetData& Other
)

Public function Const

bool

 

operator<

(
    const FAssetData& Other
)

Public function Const

bool

 

operator==

(
    const FAssetData& Other
)

FAssetDatas are equal if their object paths match

Public function Const

bool

 

operator>

(
    const FAssetData& Other
)

Deprecated Functions

Name Description

Public function Const

FSoftObjectP...

 

ToStringReference()

ToStringReference was renamed to ToSoftObjectPath

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