Language:
Discover
By Skill Level
By Category

FAssetData

Choose your OS:

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 chunks 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

UObject *...

 

GetAsset()

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

Public function

UClass *

 

GetClass()

Returns the class UClass if it is loaded.

Public function

void

 

GetExportTextName

(
    FString & OutExportTextName
)

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

Public function

FString

 

GetExportTextName()

Returns 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

void

 

GetFullName

(
    FString & OutFullName
)

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

Public function

FString

 

GetFullName()

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

Public function

UPackage ...

 

GetPackage()

Public function

FPrimaryAsse ...

 

GetPrimaryAssetId()

Gets primary asset id of this data

Public function

bool

 

GetTagValue

(
    const FName InTagName,
    FName & OutTagValue
)

Public function

bool

 

GetTagValue

(
    const FName InTagName,
    FString & OutTagValue
)

Public function

bool

 

GetTagValue

(
    const FName InTagName,
    ValueType& OutTagValue
)

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

Public function

bool

 

GetTagValue

(
    const FName InTagName,
    FText & OutTagValue
)

Public function

FString

 

GetTagValueRef

(
    const FName InTagName
)

Public function

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

FName

 

GetTagValueRef

(
    const FName InTagName
)

Public function

FText

 

GetTagValueRef

(
    const FName InTagName
)

Public function

bool

 

IsAssetLoaded()

Returns true if the asset is loaded

Public function

bool

 

IsRedirector()

Returns true if the this asset is a redirector.

Public function

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

bool

 

IsValid()

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

Public function

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

FSoftObjectP ...

 

ToSoftObjectPath()

Convert to a SoftObjectPath for loading

Public function

FSoftObjectP ...

 

ToStringReference()

Operators

Name Description

Public function

bool

 

operator!=

(
    const FAssetData & Other
)

Public function

bool

 

operator<

(
    const FAssetData & Other
)

Public function

bool

 

operator==

(
    const FAssetData & Other
)

FAssetDatas are equal if their object paths match

Public function

bool

 

operator>

(
    const FAssetData & Other
)

References

Module

AssetRegistry

Header

Runtime/AssetRegistry/Public/AssetData.h