Module |
|
Header |
/Engine/Plugins/Runtime/DataRegistry/Source/DataRegistry/Public/DataRegistryId.h |
Include |
#include "DataRegistryId.h" |
[USTRUCT](Programming/UnrealArchitecture/Reference/Structs)([BlueprintType](Programming/UnrealArchitecture/Reference/Structs/Specifiers/BlueprintType))
struct FDataRegistryType
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.
Name | Description | |
---|---|---|
|
FDataRegistryType() |
Constructors, one for each FName constructor |
|
FDataRegistryType ( |
|
|
FDataRegistryType ( |
|
|
FDataRegistryType ( |
|
|
FDataRegistryType ( |
Name | Description | ||
---|---|---|---|
|
ExportTextItem ( |
UStruct Overrides |
|
|
GetName() |
Returns internal Name explicitly, not normally needed |
|
|
ImportTextItem ( |
||
|
IsValid() |
Returns true if this is a valid Type |
|
|
SerializeFromMismatchedTag ( |
||
|
ToString() |
Returns string version of this Type |
Name | Description | ||
---|---|---|---|
|
operator const FName &() |
||
|
operator FName &() |
Implicitly convert to FName |
|
|
operator!= ( |
||
|
FDataRegistr... |
operator= ( |
|
|
operator== ( |
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. |