unreal.AssetData

class unreal.AssetData(package_name: Name = 'None', package_path: Name = 'None', asset_name: Name = 'None', asset_class_path: TopLevelAssetPath = Ellipsis)

Bases: StructBase

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

C++ Source:

  • Module: CoreUObject

  • File: NoExportTypes.h

Editor Properties: (see get_editor_property/set_editor_property)

  • asset_class (Name): [Read-Write] The name of the asset’s class deprecated: Short asset class name must be converted to full asset pathname. Use AssetClassPath instead.

  • asset_class_path (TopLevelAssetPath): [Read-Write] The path name of the asset’s class

  • asset_name (Name): [Read-Write] The name of the asset without the package

  • package_name (Name): [Read-Write] The name of the package in which the asset is found, this is the full long package name such as /Game/Path/Package

  • package_path (Name): [Read-Write] The path to the package in which the asset is found, this is /Game/Path with the Package stripped off

property asset_class: Name

[Read-Only] The name of the asset’s class deprecated: Short asset class name must be converted to full asset pathname. Use AssetClassPath instead.

Type:

(Name)

property asset_class_path: TopLevelAssetPath

[Read-Only] The path name of the asset’s class

Type:

(TopLevelAssetPath)

property asset_name: Name

[Read-Only] The name of the asset without the package

Type:

(Name)

find_asset_native_class()

Returns the first native class of the asset type that can be found. Normally this is just the FAssetData::GetClass(), however if the class is a blueprint generated class it may not be loaded. In which case GetAncestorClassNames will be used to find the first native super class. This can be slow if temporary caching mode is not on.

Return type:

type(Class)

get_asset() Object

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

Return type:

Object

get_class()

Get Class

Return type:

type(Class)

get_export_text_name() str

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

Return type:

str

get_full_name() str

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

Return type:

str

get_tag_value(tag_name) str or None

Gets the value associated with the given tag as a string

Parameters:

tag_name (Name) –

Returns:

out_tag_value (str):

Return type:

str or None

is_asset_loaded() bool

Returns true if the asset is loaded

Return type:

bool

is_redirector() bool

Returns true if the this asset is a redirector.

Return type:

bool

is_u_asset() bool

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

Return type:

bool

is_valid() bool

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

Return type:

bool

property package_name: Name

[Read-Only] The name of the package in which the asset is found, this is the full long package name such as /Game/Path/Package

Type:

(Name)

property package_path: Name

[Read-Only] The path to the package in which the asset is found, this is /Game/Path with the Package stripped off

Type:

(Name)

to_soft_object_path() SoftObjectPath

Convert to a SoftObjectPath for loading

Return type:

SoftObjectPath