unreal.PrimaryDataAsset

class unreal.PrimaryDataAsset(outer=None, name='None')

Bases: unreal.DataAsset

A DataAsset that implements GetPrimaryAssetId and has asset bundle support, which allows it to be manually loaded/unloaded from the AssetManager. Instances of native subclasses can be created directly as Data Assets and will use the name of the native class as the PrimaryAssetType. Or, blueprint subclasses can be created with a PrimaryAssetType equal to the name of the first native class going up the hierarchy, or the highest level blueprint class. IE, if you have UPrimaryDataAsset -> UParentNativeClass -> UChildNativeClass -> DataOnlyBlueprintClass the type will be ChildNativeClass. Whereas if you have UPrimaryDataAsset -> ParentBlueprintClass -> DataOnlyBlueprintClass the type will be ParentBlueprintClass. To change this behavior, override GetPrimaryAssetId in your native class or copy those functions into a different native base class.

C++ Source:

  • Module: Engine

  • File: DataAsset.h