UPrimaryDataAsset

A DataAsset that implements GetPrimaryAssetId and has asset bundle support, which makes it something that can be manually loaded/unloaded from the AssetManager Making blueprint subclasses of this is useful because you can make blueprint-only primary asset types Blueprint subclasses will end up with a PrimaryAssetType equal to the name of the first native class found going up the hierarchy, or the top level blueprint class that directly subclasses this IE, if you have PrimaryDataAsset -> ParentNativeClass -> ChildNativeClass -> BlueprintAsset the type will be ChildNativeClass Whereas if you have PrimaryDataAsset -> ParentBlueprintClass -> ChildBlueprintClass the type will be ParentBlueprintClass To override this behavior, override GetPrimaryAssetId in your native class

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/Engine/DataAsset.h

Include

#include "Engine/DataAsset.h"

Syntax

class UPrimaryDataAsset : public UDataAsset

Remarks

A DataAsset that implements GetPrimaryAssetId and has asset bundle support, which makes it something that can be manually loaded/unloaded from the AssetManager Making blueprint subclasses of this is useful because you can make blueprint-only primary asset types Blueprint subclasses will end up with a PrimaryAssetType equal to the name of the first native class found going up the hierarchy, or the top level blueprint class that directly subclasses this IE, if you have PrimaryDataAsset -> ParentNativeClass -> ChildNativeClass -> BlueprintAsset the type will be ChildNativeClass Whereas if you have PrimaryDataAsset -> ParentBlueprintClass -> ChildBlueprintClass the type will be ParentBlueprintClass To override this behavior, override GetPrimaryAssetId in your native class

Variables

Name Description

Protected variable

FAssetBundleDat...

 

AssetBundleData

Asset Bundle data computed at save time. In cooked builds this is accessible from AssetRegistry

Functions

Name Description

Public function Virtual

void

 

UpdateAssetBundleData()

This scans the class for AssetBundles metadata on asset properties and initializes the AssetBundleData with InitializeAssetBundlesFromMetadata

Overridden from UObject

Name Description

Public function Virtual Const

FPrimaryAsse...

 

GetPrimaryAssetId()

Returns an Type:Name pair representing the PrimaryAssetId for this object.

Public function Virtual

void

 

PostLoad()

Do any object-specific cleanup required immediately after loading an object.

Public function Virtual

void

 

PreSave

(
    const ITargetPlatform* TargetP...
)

Updates AssetBundleData

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