Navigation
Unreal Engine C++ API Reference > Runtime > CoreUObject > UObject
Inheritance Hierarchy
- TPersistentObjectPtr
- FLazyObjectPtr
- TLazyObjectPtr
References
Module | CoreUObject |
Header | /Engine/Source/Runtime/CoreUObject/Public/UObject/LazyObjectPtr.h |
Include | #include "UObject/LazyObjectPtr.h" |
Syntax
struct FLazyObjectPtr : public TPersistentObjectPtr< FUniqueObjectGuid >
Remarks
FLazyObjectPtr is a type of weak pointer to a UObject that uses a GUID created at save time. Objects will only have consistent GUIDs if they are referenced by a lazy pointer and then saved. It will change back and forth between being valid or pending as the referenced object loads or unloads. It has no impact on if the object is garbage collected or not. It can't be directly used across a network.
NOTE: Because this only stores a GUID, it does not know how to load the destination object and does not work with Play In Editor. This will be deprecated in a future engine version and new features should use FSoftObjectPtr instead.
Constructors
Type | Name | Description | |
---|---|---|---|
Default constructor, sets to null | |||
FLazyObjectPtr
(
const UObject* Object |
Construct from object already in memory |
Functions
Type | Name | Description | |
---|---|---|---|
void | FixupForPIE
(
int32 PIEInstance |
Fixes up this FLazyObjectPtr to target the right UID as set in PIEGuidMap, this only works for directly serialized pointers | |
void | PossiblySerializeObjectGuid
(
UObject* Object, |
Called by UObject::Serialize so that we can save / load the Guid possibly associated with an object | |
void | Called when entering PIE to prepare it for PIE-specific fixups |
Operators
Type | Name | Description | |
---|---|---|---|
void | Copy from an object already in memory | ||
void | operator=
(
const FUniqueObjectGuid& InObjectID |
Copy from a unique object identifier |