Navigation
API > API/Runtime > API/Runtime/UniversalObjectLocator > API/Runtime/UniversalObjectLocator/UE__UniversalObjectLocator__ENUM-
References
| Module | UniversalObjectLocator |
| Header | /Engine/Source/Runtime/UniversalObjectLocator/Public/UniversalObjectLocatorFragmentType.h |
| Include | #include "UniversalObjectLocatorFragmentType.h" |
namespace UE
{
namespace UniversalObjectLocator
{
UE::UniversalObjectLocator::ENUM_CLASS_FLAGS
(
EFragmentTypeFlags
)
}
}
Remarks
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 FInitializeResult Initialize(const FInitializeParams& InParams) const; // Resolve the fragment to the resulting object, potentially loading or unloading it FResolveResult Resolve(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 FParseStringResult TryParseString(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.