UDataRegistrySubsystem

Singleton manager that provides synchronous and asynchronous access to data registries

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

DataRegistry

Header

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

Include

#include "DataRegistrySubsystem.h"

Syntax

[UCLASS](Programming/UnrealArchitecture/Reference/Classes#classdeclaration)(NotBlueprintType)
class UDataRegistrySubsystem : public UEngineSubsystem

Remarks

Singleton manager that provides synchronous and asynchronous access to data registries

Variables

Name Description

Protected variable

TArray< FString...

 

AssetScanPaths

Paths that will be scanned for registries.

Protected variable

bool

 

bFullyInitialized

True if initialization has finished and registries were scanned, will be false if not config enabled.

Protected variable

bool

 

bReadyForInitialization

True if initialization is ready to start, will be true even if config disabled.

Protected variable

TMap< FDataRegi...

 

PreregisterAssetMap

Protected variable

TSortedMap< FNa...

 

RegistryMap

Protected variable

TArray< FSoftOb...

 

RegistryPathsToIgnore

Specific registries to avoid registering, may be in memory but will not be registered.

Protected variable

TArray< FSoftOb...

 

RegistryPathsToLoad

Specific registries to load, will be added to AssetScanPaths at scan time.

Functions

Name Description

Public function Const

bool

 

AcquireItem

(
    const FDataRegistryId& ItemId,
    FDataRegistryItemAcquiredCallback D...
)

Start an async load of an item, delegate will be called on success or failure of acquire.

Public function Static UFunction BlueprintCallable, Category, Meta

bool

 

AcquireItemBP

Starts an asynchronous acquire of a data registry item that may not yet be cached.

Protected function Static

void

 

AddReferencedObjects

(
    UObject* InThis,
    FReferenceCollector& Collector
)

Protected function Virtual

void

 

ApplyPreregisterMap

(
    UDataRegistry* Registry
)

Public function Const

bool

 

AreRegistriesInitialized()

True if all registries should have been initialized

Public function Static UFunction BlueprintPure, Category, Meta

FString

 

Conv_DataRegistryIdToString

(
    FDataRegistryId DataRegistryId
)

Converts a Data Registry Id to a string.

Public function Static UFunction BlueprintPure, Category, Meta

FString

 

Conv_DataRegistryTypeToString

(
    FDataRegistryType DataRegistryType
)

Converts a Data Registry Type to a string.

Public function

void

 

DeinitializeAllRegistries()

De-initializes all loaded registries

Public function Static

void

 

DumpCachedItems

(
    const TArray< FString >& Args
)

Dumps out a text representation of every item in the registry

Public function Static

void

 

DumpRegistryTypeSummary()

Outputs all registered types and some info

Protected function Virtual

void

 

EndPIE

(
    bool bStartSimulate
)

Public function Static UFunction BlueprintPure, Category, Meta

bool

 

EqualEqual_DataRegistryId

(
    FDataRegistryId A,
    FDataRegistryId B
)

Returns true if the values are equal (A == B)

Public function Static UFunction BlueprintPure, Category, Meta

bool

 

EqualEqual_DataRegistryType

(
    FDataRegistryType A,
    FDataRegistryType B
)

Returns true if the values are equal (A == B)

Public function Const

FDataRegistr...

 

EvaluateCachedCurve

(
    float& OutValue,
    const FRealCurve*& OutCurve,
    FDataRegistryId ItemId,
    float InputValue,
    float DefaultValue
)

Computes an evaluated curve value, as well as the actual curve if it is found.

Public function Static UFunction BlueprintCallable, Category, Meta

void

 

EvaluateDataRegistryCurve

(
    FDataRegistryId ItemId,
    float InputValue,
    float DefaultValue,
    EDataRegistrySubsystemGetItemResult...,
    float& OutValue
)

Attempts to evaluate a curve stored in a DataRegistry cache using a specific input value

Public function Static UFunction BlueprintCallable, Category, Meta customthunk

void

 

FindCachedItemBP

(
    FDataRegistryId ItemId,
    EDataRegistrySubsystemGetItemResult...,
    FTableRowBase& OutItem
)

Attempts to get cached structure data stored in a DataRegistry, modifying OutItem if the item is available (EXPERIMENTAL) this version has an output param and enum result

Public function Static

UDataRegistr...

 

Get()

Returns the global subsystem instance

Public function Const

void

 

GetAllRegistries

(
    TArray< UDataRegistry* >& All...,
    bool bSortByType
)

Gets list of all registries, useful for iterating in UI or utilities

Public function Const

const T *...

 

GetCachedItem

(
    const FDataRegistryId& ItemId
)

Returns a cached item of specified struct type.

Public function Static UFunction BlueprintCallable, Category, Meta customthunk

bool

 

GetCachedItemBP

(
    FDataRegistryId ItemId,
    FTableRowBase& OutItem
)

Attempts to get cached structure data stored in a DataRegistry, modifying OutItem if the item is available (EXPERIMENTAL) this version has an input param and simple bool return

Public function Static UFunction BlueprintCallable, Category, Meta customthunk

bool

 

GetCachedItemFromLookupBP

(
    FDataRegistryId ItemId,
    const FDataRegistryLookup& Resolve...,
    FTableRowBase& OutItem
)

Attempts to get structure data stored in a DataRegistry cache after an async acquire, modifying OutItem if the item is available

Public function Const

FDataRegistr...

 

GetCachedItemRaw

(
    const uint8*& OutItemMemory,
    const UScriptStruct*& OutItemS...,
    const FDataRegistryId& ItemId
)

Gets the cached or precached data and struct type.

Public function Const

FDataRegistr...

 

GetCachedItemRawFromLookup

(
    const uint8*& OutItemMemory,
    const UScriptStruct*& OutItemS...,
    const FDataRegistryId& ItemId,
    const FDataRegistryLookup& Lookup
)

Gets the cached or precached data and struct type using an async acquire result.

Public function Const

FText

 

GetDisplayTextForId

(
    FDataRegistryId ItemId
)

Returns proper display text for an id, using the correct id format

Public function Const

UDataRegistr...

 

GetRegistryForType

(
    FName RegistryType
)

Finds the right registry for a type name

Public function

bool

 

IgnoreRegistryPath

(
    const FSoftObjectPath& RegistryAss...
)

Removes specific data registry asset from the registration map, can be undone with LoadRegistryPath

Public function

void

 

InitializeAllRegistries

(
    bool bResetIfInitialized
)

Initializes all loaded registries and prepares them for queries

Public function Const

bool

 

IsConfigEnabled

(
    bool bWarnIfNotEnabled
)

Returns true if the system is enabled via any config scan settings, will optionally warn if not enabled

Public function Static UFunction BlueprintPure, Category, Meta

bool

 

IsValidDataRegistryId

(
    FDataRegistryId DataRegistryId
)

Returns true if this is a non-empty item identifier, does not check if it is currently registered

Public function Static UFunction BlueprintPure, Category, Meta

bool

 

IsValidDataRegistryType

(
    FDataRegistryType DataRegistryType
)

Returns true if this is a non-empty type, does not check if it is currently registered

Public function

void

 

LoadAllRegistries()

Loads all registry assets and initializes them, this is called early in startup

Public function

bool

 

LoadRegistryPath

(
    const FSoftObjectPath& RegistryAss...
)

Load and initialize a specific registry, useful for plugins.

Public function Static UFunction BlueprintPure, Category, Meta

bool

 

NotEqual_DataRegistryId

(
    FDataRegistryId A,
    FDataRegistryId B
)

Returns true if the values are not equal (A != B)

Public function Static UFunction BlueprintPure, Category, Meta

bool

 

NotEqual_DataRegistryType

(
    FDataRegistryType A,
    FDataRegistryType B
)

Returns true if the values are not equal (A != B)

Protected function Virtual

void

 

PostAssetManager()

Protected function Virtual

void

 

PostEngineInit()

Initialization order, need to wait for other early-load systems to initialize.

Protected function Virtual

void

 

PostGameplayTags()

Protected function Virtual

void

 

PreBeginPIE

(
    bool bStartSimulate
)

Public function

void

 

PreregisterSpecificAssets

(
    const TMap< FDataRegistryType, TArr...,
    int32 AssetPriority
)

Schedules registration of assets by path, this will happen immediately or will be queued if the data registries don't exist yet

Public function

void

 

RefreshRegistryMap()

Refreshes the active registry map based on what's in memory

Public function

bool

 

RegisterSpecificAsset

(
    FDataRegistryType RegistryType,
    FAssetData& AssetData,
    int32 AssetPriority
)

Attempt to register a specified asset with all active sources that allow dynamic registration, returning true if anything changed.

Public function

void

 

ReinitializeFromConfig()

Handles changes to DataRegistrySettings while engine is running

Public function

void

 

ResetRuntimeState()

Resets state for all registries, call when gameplay has concluded to destroy caches

Public function

int32

 

UnregisterAssetsWithPriority

(
    FDataRegistryType RegistryType,
    int32 AssetPriority
)

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

Public function

bool

 

UnregisterSpecificAsset

(
    FDataRegistryType RegistryType,
    const FSoftObjectPath& AssetPath
)

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

Overridden from USubsystem

Name Description

Protected function Virtual

void

 

Deinitialize()

Implement this for deinitialization of instances of the system

Protected function Virtual

void

 

Initialize

(
    FSubsystemCollectionBase& Collecti...
)

Implement this for initialization of instances of the system

Typedefs

Name

Description

FPreregisterAsset

List of assets to attempt to register when data registries come online.

FRegistryMapPair

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