Navigation
API > API/Runtime > API/Runtime/UniversalObjectLocator
A Universal Object Locator fragment type defines a specific mechanism for resolving an object that is referenced inside a Universal Object Locator (which can be considered a chain of fragments). Each fragment contains the attributes defining its payload, and how to interact that payload.
In order to define a new fragment type, consumers must provide a UStruct 'payload' that defines the data required for the reference. The struct also defines how to interact with the payload via the following functions:
// Initialize the fragment to point at an object within a context FInitializeResultInitialize(const FInitializeParams& InParams) const; // Resolve the fragment to the resulting object, potentially loading or unloading it FResolveResultResolve(const FResolveParams& Params) const;
// Convert this fragment to its string representation void ToString(FStringBuilderBase& OutStringBuilder) const; // Try and parse this fragment from its string representation FParseStringResultTryParseString(FStringView InString, const FParseStringParams& Params) const;
// Compute a priority for this fragment based on an object and context in order to decide which fragment type should be used if multiple can address the same object static uint32 ComputePriority(const UObject Object, const UObject Context) const;
Types must also be UStructs that are equality comparable, and GetTypeHashable. These functions are bound as function pointers on construction, allowing them potentially to be inlined into the static dispatchers.
| Name | FFragmentType |
| Type | struct |
| Header File | /Engine/Source/Runtime/UniversalObjectLocator/Public/UniversalObjectLocatorFragmentType.h |
| Include Path | #include "UniversalObjectLocatorFragmentType.h" |
Syntax
struct FFragmentType
Derived Classes
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FFragmentDebugInitializer | void(*)(void *) | UniversalObjectLocatorFragmentType.h | |
| FInitializeCallback | FInitializeResult(*)(void *, const FInitializeParams &) | UniversalObjectLocatorFragmentType.h | |
| FPriorityCallback | uint32(*)(const UObject *, const UObject *) | UniversalObjectLocatorFragmentType.h | |
| FResolveCallback | FResolveResult(*)(const void *, const FResolveParams &) | UniversalObjectLocatorFragmentType.h | |
| FToString | void(*)(const void *, FStringBuilderBase &) | UniversalObjectLocatorFragmentType.h | |
| FTryParseString | FParseStringResult(*)(void *, FStringView, const FParseStringParams &) | UniversalObjectLocatorFragmentType.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| DisplayText | FText | Descriptive display text for this type of fragment type | UniversalObjectLocatorFragmentType.h | |
| Flags | EFragmentTypeFlags | Flags defining behavior of this fragment type | UniversalObjectLocatorFragmentType.h | |
| FragmentDebugInitializer | FFragmentDebugInitializer | Function callback for initializing a vftable for the fragment for debugging purposes | UniversalObjectLocatorFragmentType.h | |
| FragmentTypeID | FName | Unique identifier for this fragment type. | UniversalObjectLocatorFragmentType.h | |
| Initialize | FInitializeCallback | Function binding for initializing a payload with this fragment type | UniversalObjectLocatorFragmentType.h | |
| InstanceBindings | UE::UniversalObjectLocator::FFragmentType | Bindings structure for function pointers that directly invoke behavior on fragment type payloads | UniversalObjectLocatorFragmentType.h | |
| PayloadType | TObjectPtr< const UScriptStruct > | Struct pointer to the payload type | UniversalObjectLocatorFragmentType.h | |
| PrimaryEditorType | FName | Name of the primary editor type for this fragment type, defining how it appears on UI | UniversalObjectLocatorFragmentType.h | |
| Priority | FPriorityCallback | Static function binding for computing the priority of this fragment type | UniversalObjectLocatorFragmentType.h | |
| Resolve | FResolveCallback | Function binding for resolving a payload for this fragment type | UniversalObjectLocatorFragmentType.h | |
| StaticBindings | UE::UniversalObjectLocator::FFragmentType | Bindings structure for function pointers that directly invoke behavior on fragment type payloads | UniversalObjectLocatorFragmentType.h | |
| ToString | FToString | Function binding for serializing this payload to a string | UniversalObjectLocatorFragmentType.h | |
| TryParseString | FTryParseString | Function binding for parsing this payload from a string | UniversalObjectLocatorFragmentType.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| UniversalObjectLocatorFragmentType.h | |||
UScriptStruct * GetStruct() |
UniversalObjectLocatorFragmentType.h | ||
FInitializeResult InitializePayload
(
void* Payload, |
UniversalObjectLocatorFragmentType.h | ||
FResolveResult ResolvePayload
(
const void* Payload, |
UniversalObjectLocatorFragmentType.h | ||
void ToString
(
const void* Payload, |
UniversalObjectLocatorFragmentType.h | ||
FParseStringResult TryParseString
(
void* Payload, |
UniversalObjectLocatorFragmentType.h |