UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FPrimaryAssetTypeInfo Struct Reference

#include <AssetManagerTypes.h>

Public Member Functions

 FPrimaryAssetTypeInfo ()
 
 FPrimaryAssetTypeInfo (FName InPrimaryAssetType, UClass *InAssetBaseClass, bool bInHasBlueprintClasses, bool bInIsEditorOnly)
 
 FPrimaryAssetTypeInfo (FName InPrimaryAssetType, UClass *InAssetBaseClass, bool bInHasBlueprintClasses, bool bInIsEditorOnly, TArray< FDirectoryPath > &&InDirectories, TArray< FSoftObjectPath > &&InSpecificAssets)
 
const TSoftClassPtr< UObject > & GetAssetBaseClass () const
 
void SetAssetBaseClass (const TSoftClassPtr< UObject > &InAssetBaseClass)
 
const TArray< FDirectoryPath > & GetDirectories () const
 
TArray< FDirectoryPath > & GetDirectories ()
 
const TArray< FSoftObjectPath > & GetSpecificAssets () const
 
TArray< FSoftObjectPath > & GetSpecificAssets ()
 
ENGINE_API bool HasValidConfigData () const
 
ENGINE_API bool HasValidRuntimeData () const
 
ENGINE_API bool CanModifyConfigData () const
 
ENGINE_API void FillRuntimeData (bool &bIsValid, bool &bBaseClassWasLoaded)
 

Public Attributes

FName PrimaryAssetType
 
TObjectPtr< UClassAssetBaseClassLoaded
 
bool bHasBlueprintClasses
 
bool bIsEditorOnly
 
FPrimaryAssetRules Rules
 
TArray< FString > AssetScanPaths
 
bool bIsDynamicAsset
 
int32 NumberOfAssets
 

Detailed Description

Structure with publicly exposed information about an asset type. These can be loaded out of a config file or constructed at runtime

Constructor & Destructor Documentation

◆ FPrimaryAssetTypeInfo() [1/3]

FPrimaryAssetTypeInfo::FPrimaryAssetTypeInfo ( )
inline

◆ FPrimaryAssetTypeInfo() [2/3]

FPrimaryAssetTypeInfo::FPrimaryAssetTypeInfo ( FName  InPrimaryAssetType,
UClass InAssetBaseClass,
bool  bInHasBlueprintClasses,
bool  bInIsEditorOnly 
)
inline

Initializes a runtime version of the struct

◆ FPrimaryAssetTypeInfo() [3/3]

FPrimaryAssetTypeInfo::FPrimaryAssetTypeInfo ( FName  InPrimaryAssetType,
UClass InAssetBaseClass,
bool  bInHasBlueprintClasses,
bool  bInIsEditorOnly,
TArray< FDirectoryPath > &&  InDirectories,
TArray< FSoftObjectPath > &&  InSpecificAssets 
)
inline

Member Function Documentation

◆ CanModifyConfigData()

bool FPrimaryAssetTypeInfo::CanModifyConfigData ( ) const

Returns true if it is safe to modify config data as it has not been turned into runtime data yet

◆ FillRuntimeData()

void FPrimaryAssetTypeInfo::FillRuntimeData ( bool bIsValid,
bool bBaseClassWasLoaded 
)

Fills out transient variables based on parsed ones. Sets status bools saying rather data is valid, and rather it had to synchronously load the base class

◆ GetAssetBaseClass()

const TSoftClassPtr< UObject > & FPrimaryAssetTypeInfo::GetAssetBaseClass ( ) const
inline

Gets the config version of the asset base class

◆ GetDirectories() [1/2]

TArray< FDirectoryPath > & FPrimaryAssetTypeInfo::GetDirectories ( )
inline

Modify the config version of directories to scan, only possible before runtime data is filled in

◆ GetDirectories() [2/2]

const TArray< FDirectoryPath > & FPrimaryAssetTypeInfo::GetDirectories ( ) const
inline

Access the config version of directories to scan, may be empty for runtime-added types

◆ GetSpecificAssets() [1/2]

TArray< FSoftObjectPath > & FPrimaryAssetTypeInfo::GetSpecificAssets ( )
inline

Modify the config version of specific assets to scan, only possible before runtime data is filled in

◆ GetSpecificAssets() [2/2]

const TArray< FSoftObjectPath > & FPrimaryAssetTypeInfo::GetSpecificAssets ( ) const
inline

Access the config version of specific assets to scan, may be empty for runtime-added types

◆ HasValidConfigData()

bool FPrimaryAssetTypeInfo::HasValidConfigData ( ) const

Returns true if this has valid config data that can be converted into runtime data as needed, this may be false for runtime only info

◆ HasValidRuntimeData()

bool FPrimaryAssetTypeInfo::HasValidRuntimeData ( ) const

Returns true if this has valid runtime data because FillRuntimeData was previously called

◆ SetAssetBaseClass()

void FPrimaryAssetTypeInfo::SetAssetBaseClass ( const TSoftClassPtr< UObject > &  InAssetBaseClass)
inline

Set the base class, only possible before runtime data is filled in

Member Data Documentation

◆ AssetBaseClassLoaded

TObjectPtr<UClass> FPrimaryAssetTypeInfo::AssetBaseClassLoaded

Runtime cached copy of asset base class, this will only be correct if FillRuntimeData has been called

◆ AssetScanPaths

TArray<FString> FPrimaryAssetTypeInfo::AssetScanPaths

Combination of directories and individual assets to search for this asset type. Will have the Directories and Assets added to it but may include virtual paths

◆ bHasBlueprintClasses

bool FPrimaryAssetTypeInfo::bHasBlueprintClasses

True if the assets loaded are blueprints classes, false if they are normal UObjects

◆ bIsDynamicAsset

bool FPrimaryAssetTypeInfo::bIsDynamicAsset

True if this is an asset created at runtime that has no on disk representation. Cannot be set in config

◆ bIsEditorOnly

bool FPrimaryAssetTypeInfo::bIsEditorOnly

If true this type will not cause anything to be cooked; the AssetManager will use instances of this type to define chunk assignments and NeverCook rules, but will ignore AlwaysCook rules. Assets labeled by instances of this type will need to be reference by another PrimaryAsset, or by something outside the AssetManager, to be cooked.

◆ NumberOfAssets

int32 FPrimaryAssetTypeInfo::NumberOfAssets

Number of tracked assets of that type

◆ PrimaryAssetType

FName FPrimaryAssetTypeInfo::PrimaryAssetType

The logical name for this type of Primary Asset

◆ Rules

FPrimaryAssetRules FPrimaryAssetTypeInfo::Rules

Default management rules for this type, individual assets can be overridden


The documentation for this struct was generated from the following files: