UMetaDataRegistrySource

Base class for a data source that generates additional data sources at runtime

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

References

Module

DataRegistry

Header

/Engine/Plugins/Runtime/DataRegistry/Source/DataRegistry/Public/DataRegistrySource.h

Include

#include "DataRegistrySource.h"

Syntax

UCLASS(Abstract)
class UMetaDataRegistrySource : public UDataRegistrySource

Remarks

Base class for a data source that generates additional data sources at runtime

Variables

Name Description

Public variable UProperty Category, EditAnywhere

EMetaDataRegist...

 

AssetUsage

Asset usage

Protected variable

FDelegateHandle

 

NewAssetSearchRootHandle

Delegate handle for OnNewAssetSearchRoot

Protected variable UProperty Transient

TMap< FName, UD...

 

RuntimeChildren

Map from source identifier such as package name to registered child

Protected variable

TArray< FName >

 

RuntimeNames

List of desired source ids, in order

Public variable UProperty Category, EditAnywhere, Meta

FAssetManagerSe...

 

SearchRules

Asset registry scan rules

Protected variable

TArray< FRegist...

 

SpecificRegisteredAssets

Functions

Name Description

Public function Virtual

void

 

DetermineRuntimeNames

(
    TArray< FName >& OutRuntimeNames
)

Fills in list of desired runtime names, must be overridden!

Public function Virtual

bool

 

DoesAssetPassFilter

(
    const FAssetData& AssetData,
    bool bNewRegisteredAsset
)

Returns true if this asset data passes the filter for this meta source, bNewRegisteredAsset is true if it comes from a RegisterSpecificAsset call and needs extra path checking

Public function Virtual Const

TSubclassOf<...

 

GetChildSourceClass()

Returns what subclass of source to use for children, must be overridden!

Protected function Virtual

void

 

OnNewAssetSearchRoot

(
    const FString& SearchRoot
)

Callback registered when an asset search root as been added post launch

Public function Virtual

bool

 

SetDataForChild

(
    FName SourceName,
    UDataRegistrySource* ChildSour...
)

Fills in new or existing child source for specific name, must be overridden!

Protected function Virtual

void

 

SortRegisteredAssets()

Sort assets, default order is by priority then array order

Overridden from UDataRegistrySource

Name Description

Public function Virtual

void

 

AddRuntimeSources

(
    TArray< UDataRegistrySource* >...
)

Gets the list of runtime sources that should be registered for this source, will either be itself or a list of children

Public function Virtual Const

bool

 

IsSpecificAssetRegistered

(
    const FSoftObjectPath& AssetPath
)

Returns true if this asset is already registered with this source

Public function Virtual

void

 

RefreshRuntimeSources()

Called to regenerate runtime sources if needed, won't do anything for simple sources

Public function Virtual

bool

 

RegisterSpecificAsset

(
    const FAssetData& AssetData,
    int32 AssetPriority
)

Attempt to register a specified asset with a source, returns true if any changes were made.

Public function Virtual

int32

 

UnregisterAssetsWithPriority

(
    int32 AssetPriority
)

Unregisters all previously registered assets in a specific registry with a specific priority, can be used as a batch reset.

Public function Virtual

bool

 

UnregisterSpecificAsset

(
    const FSoftObjectPath& AssetPath
)

Removes references to a specific asset, returns bool if it was removed

Typedefs

Name

Description

FRegisteredAsset

List of specific assets registered with source, in runtime order sorted by priority