Navigation
Unreal Engine C++ API Reference > Plugins > DataRegistry
References
Module | DataRegistry |
Header | /Engine/Plugins/Runtime/DataRegistry/Source/DataRegistry/Public/DataRegistryId.h |
Include | #include "DataRegistryId.h" |
Syntax
USTRUCT (BlueprintType )
struct FDataRegistryType
Remarks
A DataRegistry item is an arbitrary USTRUCT representing a specific piece of data, that can be acquired from many possible sources, cached, and returned to requesting code. It is similar in concept to a DataTable Row, and will often literally be one.
Here is the asynchronous data flow to go from DataRegistryId to a DataRegistryItem:
DataRegistryId is constructed with either a special editor customization or at runtime. Can be a gameplay tag or raw name
User tells DataRegistrySubsystem to start an async request to fetch a DataRegistryItem using the Id, and passes in a context object
Subsystem finds the right DataRegistry by looking at the type and forwards the request
Registry resolves the id into DataRegistryLookup using the context object and game specific logic (ex: converts tag Banner.Foo.Bar into Foo_Bar in a local datatable)
Registry looks in its cache for that lookup, if it is found and valid then it schedules success callback for next frame
If not found in cache, use lookup to search DataRegistrySources in order
Source looks for item, if finding it requires loading an asset or accessing the internet this may take a long time
If source fails to find item, try next source until exhausted. If all exhausted, schedule failure callback
If source finds item, cache found result into Registry, then schedule success callback
Once asset is in cache due to previous async call or always loaded assets, it can be accessed directly via the subsystem cache get functions Wrapper struct to represent a global data registry, represented as an FName internally and implicitly convertible back and forth. This exists so the blueprint API can understand it's not a normal FName.
Variables
Type | Name | Description | |
---|---|---|---|
![]() ![]() ![]() ![]() ![]() |
FName | Name | The FName representing this type |
Constructors
Type | Name | Description | |
---|---|---|---|
![]() |
Constructors, one for each FName constructor | ||
![]() |
FDataRegistryType
(
FName InName |
||
![]() |
FDataRegistryType
(
EName InName |
||
![]() |
FDataRegistryType
(
const WIDECHAR* InName |
||
![]() |
FDataRegistryType
(
const ANSICHAR* InName |
Functions
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
bool | ExportTextItem
(
FString& ValueStr, |
UStruct Overrides |
![]() ![]() |
FName | GetName () |
Returns internal Name explicitly, not normally needed |
![]() |
bool | ImportTextItem
(
const TCHAR*& Buffer, |
|
![]() ![]() |
bool | IsValid () |
Returns true if this is a valid Type |
![]() |
bool | SerializeFromMismatchedTag
(
FPropertyTag const& Tag, |
|
![]() ![]() |
FString | ToString () |
Returns string version of this Type |
Operators
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
|||
![]() |
Implicitly convert to FName | ||
![]() ![]() |
bool | operator!=
(
const FDataRegistryType& Other |
|
![]() ![]() |
bool | operator==
(
const FDataRegistryType& Other |
Constants
Name | Description |
---|---|
CustomContextType | Fake type that can be used in the picker UI to specify that the Id contains a context-specific name that will be interpreted later |
ItemStructMetaData | MetaData tag for both Type and Id that is used to restrict available registries to a certain item struct base class, ex. |