Navigation
Unreal Engine C++ API Reference > Plugins > DataRegistry
Inheritance Hierarchy
- UObject
- UDataRegistry
References
Module | DataRegistry |
Header | /Engine/Plugins/Runtime/DataRegistry/Source/DataRegistry/Public/DataRegistry.h |
Include | #include "DataRegistry.h" |
Syntax
UCLASS ()
class UDataRegistry : public UObject
Remarks
Defines a place to efficiently store and retrieve structure data, can be used as a wrapper around Data/Curve Tables or extended with other sources
Variables
Type | Name | Description | |
---|---|---|---|
![]() ![]() ![]() ![]() |
TArray< TObjectPtr< UDataRegistrySource > > | DataSources | List of data sources to search for items |
![]() ![]() ![]() |
FDataRegistryCachePolicy | DefaultCachePolicy | Editor-set cache policy |
![]() ![]() ![]() |
FDataRegistryIdFormat | IdFormat | Rules for specifying valid item Ids, if default than any name can be used |
![]() ![]() ![]() ![]() |
TObjectPtr< const UScriptStruct > | ItemStruct | Structure type of all for items in this registry |
![]() |
FDataRegistryCacheVersionCallback | OnCacheVersionInvalidatedCallback | Callback for when cache version changes, might be moved later |
![]() ![]() ![]() ![]() |
FName | RegistryType | Globally unique name used to identify this registry |
![]() |
FDataRegistryCachePolicy | RuntimeCachePolicy | Runtime override |
![]() ![]() ![]() ![]() ![]() |
TArray< TObjectPtr< UDataRegistrySource > > | RuntimeSources | TODO remove VisibleDefaultsOnly or figure out how to stop it from letting you edit the instance properties. |
![]() ![]() ![]() |
float | TimerUpdateFrequency | How often to check for cache updates |
Constructors
Type | Name | Description | |
---|---|---|---|
![]() |
Destructors
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
Functions
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
bool | AcquireItem
(
const FDataRegistryId& ItemId, |
Start an async request for a single item |
![]() ![]() |
bool | AcquireItemInternal
(
const FDataRegistryId& ItemId, |
Start an async request |
![]() ![]() ![]() |
void | AddAllIdsForResolvedName
(
TSet< FDataRegistryId >& PossibleIds, |
Adds all possible source ids for resolved name to set, regardless of request context, default just uses the name |
![]() ![]() |
void | AddReferencedObjects
(
UObject* InThis, |
|
![]() ![]() |
void | Applies the cache policy, is called regularly but can be manually executed | |
![]() ![]() |
bool | BatchAcquireItems
(
const TArray< FDataRegistryId >& ItemIds, |
Start an async request for multiple items |
![]() ![]() |
bool | BatchAcquireSourceItems
(
TArray< FDataRegistrySourceItemId >& SourceItems, |
Request a list of source items |
![]() ![]() |
void | BeginDestroy () |
|
![]() ![]() |
void | Deinitialize () |
Disable access and restore to state before initialization, won't do anything if not initialized |
![]() ![]() |
void | DelayedHandleSuccessCallbacks
(
FDataRegistryLookup Lookup |
Frame-delayed callback to call success for already loaded items |
![]() ![]() ![]() |
bool | DidRegisterAssetResultCauseChange
(
EDataRegistryRegisterAssetResult RegisterAssetStatus |
Use this to confirm that a DataRegistryRegisterAssetResult caused a change to the Data Registry. |
![]() ![]() |
bool | DoesItemStructMatchFilter
(
FName FilterStructName |
Returns true if this registry struct inherits from a particular named struct |
![]() ![]() |
void | Validate and refresh registration | |
![]() ![]() |
const FCachedDataRegistryItem * | FindCachedData
(
const FDataRegistryId& ItemId, |
Returns internal cached data or raw memory ptr for precached data |
![]() ![]() |
void | ForEachCachedItem
(
const FString& ContextString, |
Method to run the given predicate on all items |
![]() ![]() ![]() |
FDataRegistryCacheGetResult | GetAllCachedItems
(
TMap< FDataRegistryId, const uint8* >& OutItemMap, |
Fills in a map with all cached (and precached) ids and items for fast iteration. |
![]() ![]() |
void | GetAllItems
(
const TCHAR* ContextString, |
Method to get all items in the registry |
![]() ![]() ![]() |
void | GetAllSourceItems
(
TArray< FDataRegistrySourceItemId >& OutSourceItems |
Returns all source ids for editor display |
![]() ![]() ![]() |
FDataRegistryCacheGetResult | GetCachedCurveRaw
(
const FRealCurve*& OutCurve, |
Curve wrapper for get function |
![]() ![]() |
const T * | GetCachedItem
(
const FDataRegistryId& ItemId |
Finds the cached item, using the request context to handle remapping |
![]() ![]() ![]() |
FDataRegistryCacheGetResult | GetCachedItemRaw
(
const uint8*& OutItemMemory, |
Returns the raw cached data and struct type, useful for generic C++ calls |
![]() ![]() ![]() |
FDataRegistryCacheGetResult | GetCachedItemRawFromLookup
(
const uint8*& OutItemMemory, |
Finds the cached item using a resolved lookup, this can be useful after a load has happened to ensure you get the exact item requested |
![]() ![]() ![]() |
FDataRegistryCacheGetResult | Returns the current cache version for a successful get, may change depending on stack-specific resolve settings | |
![]() ![]() ![]() |
void | GetChildRuntimeSources
(
UDataRegistrySource* ParentSource, |
Gets list of child runtime sources created by passed in source, in order registered |
![]() ![]() |
float | Gets the current time | |
![]() ![]() |
const FDataRegistryIdFormat & | GetIdFormat () |
Gets the formatting for this Id |
![]() ![]() |
void | GetItemNames
(
TArray< FName >& ItemNames |
Method to get all item names in teh registry |
![]() ![]() |
const UScriptStruct * | Returns the struct used by this registry, everything returned will be this or a subclass | |
![]() ![]() ![]() |
EDataRegistryAvailability | Returns the worst availability for anything stored in this registry, if this is Precached then this registry is a wrapper around already loaded data | |
![]() ![]() ![]() |
void | GetPossibleRegistryIds
(
TArray< FDataRegistryId >& OutRegistryIds, |
Fills in a list of all item ids provided by this registry, sorted for display |
![]() ![]() ![]() |
FText | Gets a human readable summary of registry, for UI usage | |
![]() ![]() |
const FName | Returns the name for type exposed by this registry | |
![]() ![]() |
const FDataRegistryCachePolicy & | Gets the current general cache policy | |
![]() ![]() |
int32 | GetSourceIndex
(
const UDataRegistrySource* Source, |
Returns the index of a source in the source list |
![]() ![]() |
FTimerManager * | Returns a timer manager that is safe to use for asset loading actions. | |
![]() ![]() |
void | HandleAcquireCallbacks
(
const FDataRegistryLookup& Lookup, |
Handle sending completion/error callbacks |
![]() ![]() |
void | HandleAcquireResult
(
const FDataRegistrySourceAcquireRequest& Request, |
Call to indicate that a item is available, will insert into cache |
![]() ![]() |
void | HandleCacheEntryState
(
const FDataRegistryLookup& Lookup, |
Advances state machine for a cached entry |
![]() ![]() |
bool | Initialize () |
Initialize for requests, called when subsystem starts up and should return true on success |
![]() ![]() |
void | Bump the cache version from some external event like game-specific file loading | |
![]() ![]() ![]() |
bool | IsCacheGetResultValid
(
FDataRegistryCacheGetResult Result |
Checks if a previous cached get is still valid |
![]() ![]() ![]() |
bool | Returns true if this state has been initialized for use | |
![]() ![]() ![]() |
UDataRegistrySource * | LookupSource
(
FName& OutResolvedName, |
Find the source associated with a lookup index |
![]() ![]() ![]() |
FName | MapIdToResolvedName
(
const FDataRegistryId& ItemId, |
Maps from a type:name pair to a per-source resolved name, default just returns the name |
![]() ![]() |
void | Marks this registry for needing a runtime refresh at next opportunity | |
![]() ![]() |
FDataRegistryCacheVersionCallback & | Accesses the delegate called when cache version changes | |
![]() ![]() |
void | PostEditChangeProperty
(
FPropertyChangedEvent& PropertyChangedEvent |
|
![]() ![]() |
void | PostRename
(
UObject* OldOuter, |
|
![]() ![]() |
void | Refresh the RuntimeSources list | |
![]() ![]() |
EDataRegistryRegisterAssetResult | RegisterSpecificAsset
(
const FAssetData& AssetData, |
Attempt to register a specified asset with a source, returns an EDataRegistryRegisterAssetResult, indicating whether the asset was registered or not. |
![]() ![]() |
void | Reset caches and state because gameplay finished due to PIE shutting down or the game registering a return to main menu, but stay initialized for future use | |
![]() ![]() ![]() |
bool | ResolveDataRegistryId
(
FDataRegistryLookup& OutLookup, |
Resolves an item id into a specific source and unique id, this can remap the names using game-specific rules. |
![]() ![]() |
void | Conditionally refresh the runtime state if needed | |
![]() |
void | SetRuntimeCachePolicy
(
const FDataRegistryCachePolicy& NewPolicy |
Sets the current cache policy, could cause items to get released |
![]() ![]() |
void | TimerUpdate () |
Called on timer tick when initialized |
![]() ![]() |
int32 | UnregisterAssetsWithPriority
(
int32 AssetPriority |
Unregisters all previously registered assets in a specific registry with a specific priority, can be used as a batch reset. |
![]() ![]() |
bool | UnregisterSpecificAsset
(
const FSoftObjectPath& AssetPath |
Removes references to a specific asset, returns bool if it was removed |
![]() ![]() |
void | UpdateBatchRequest
(
const FDataRegistryRequestId& RequestId, |
Check on any batch requests that need processing, if filter is empty will process all |