Navigation
API > API/Runtime > API/Runtime/UniversalObjectLocator
Universal Object Locators (UOLs) define an address to an object.
The address is implemented as a chain of FUniversalObjectLocatorFragments, allowing addressing of objects that may be nested deeply within levels of externally defined spawn or ownership logic.
For example, a Universal Object Locator may reference an Anim Instance within a Skeletal Mesh Actor is spawned by a Child Actor Component that is spawned by Sequencer. This is impossible with a regular soft object path, but is perfectly feasible for a UOL.
This type is 16 bytes.
| Name | FUniversalObjectLocator |
| Type | struct |
| Header File | /Engine/Source/Runtime/UniversalObjectLocator/Public/UniversalObjectLocator.h |
| Include Path | #include "UniversalObjectLocator.h" |
Syntax
USTRUCT (BlueprintType , Category=GameFramework,
Meta=(HasNativeMake="/Script/Engine.UniversalObjectLocatorScriptingExtensions.MakeUniversalObjectLocator"))
struct FUniversalObjectLocator
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FUniversalObjectLocator
(
UObject* Object, |
Attempt to construct this locator from a given object. | UniversalObjectLocator.h | |
| Default constructor | UniversalObjectLocator.h |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FParseStringParams | UE::UniversalObjectLocator::FParseStringParams | UniversalObjectLocator.h | |
| FParseStringResult | UE::UniversalObjectLocator::FParseStringResult | UniversalObjectLocator.h | |
| FResolveParams | UE::UniversalObjectLocator::FResolveParams | UniversalObjectLocator.h | |
| FResolveResult | UE::UniversalObjectLocator::FResolveResult | UniversalObjectLocator.h | |
| FResolveResultData | UE::UniversalObjectLocator::FResolveResultData | UniversalObjectLocator.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Fragments | TArray< FUniversalObjectLocatorFragment > | Array of relative locators ordered sequentially from outer to inner. | UniversalObjectLocator.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AddFragment
(
FUniversalObjectLocatorFragment&& InFragment |
Add a fragment to the end of this locator | UniversalObjectLocator.h | |
void AddFragment
(
ArgTypes&&... FragmentArgs |
Templated helper for AddFragment | UniversalObjectLocator.h | |
| Attempt to find the object this locator points to. | UniversalObjectLocator.h | ||
| Attempt to find the object this locator points to, loading it if necessary (and possible). | UniversalObjectLocator.h | ||
FResolveResult AsyncUnload
(
UObject* Context |
Attempt to unload the object this locator points to if possible. | UniversalObjectLocator.h | |
bool ExportTextItem
(
FString& ValueStr, |
UniversalObjectLocator.h | ||
bool ForEachFragment
(
TFunctionRef< bool(int32, int32, const FUniversalObjectLocatorFragment&)> InFunction |
Iterate the fragments in this address | UniversalObjectLocator.h | |
UE::UniversalObjectLocator::EFragmentTypeFlags GetDefaultFlags() |
Iterates over all fragments and combines their types' default flags. | UniversalObjectLocator.h | |
const FUniversalObjectLocatorFragment * GetLastFragment () |
Retrieve the last fragment in this address | UniversalObjectLocator.h | |
| Retrieve the last fragment in this address | UniversalObjectLocator.h | ||
const UE::UniversalObjectLocator::FFragmentType * GetLastFragmentType() |
Retrieve the fragment type relating to the last locator in this address | UniversalObjectLocator.h | |
UE::UniversalObjectLocator::FFragmentTypeHandle GetLastFragmentTypeHandle() |
Retrieve the fragment type handle relating to the last locator in this address | UniversalObjectLocator.h | |
bool ImportTextItem
(
const TCHAR*& Buffer, |
UniversalObjectLocator.h | ||
bool IsEmpty() |
Check if this locator is 'empty'. An empty locator contains no fragments and will never resolve. | UniversalObjectLocator.h | |
| Attempt to reset this locator to point at a different object. | UniversalObjectLocator.h | ||
void Reset () |
Reset this locator back to its default-constructed, empty state | UniversalObjectLocator.h | |
FResolveResult Resolve
(
const FResolveParams& Params |
Attempt to resolve this locator by invoking the payload's 'Resolve' function | UniversalObjectLocator.h | |
bool SerializeFromMismatchedTag
(
const FPropertyTag& Tag, |
UniversalObjectLocator.h | ||
| Attempt to find the object this locator points to. | UniversalObjectLocator.h | ||
| Attempt to find the object this locator points to, loading it if necessary (and possible), and blocking until it is loaded. | UniversalObjectLocator.h | ||
void SyncUnload
(
UObject* Context |
Attempt to unload the object this locator points to if possible. | UniversalObjectLocator.h | |
void ToString
(
FStringBuilderBase& OutString |
Convert this locator to its string representation | UniversalObjectLocator.h | |
FParseStringResult TryParseString
(
FStringView InString, |
Attempt to deserialize this locator from a string | UniversalObjectLocator.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static FUniversalObjectLocator FromString
(
FStringView InString, |
Attempt to deserialize a new locator from a string. | UniversalObjectLocator.h |