Navigation
API > API/Runtime > API/Runtime/CoreUObject
TPersistentObjectPtr is a template base class for FLazyObjectPtr and FSoftObjectPtr
| Name | TPersistentObjectPtr |
| Type | struct |
| Header File | /Engine/Source/Runtime/CoreUObject/Public/UObject/PersistentObjectPtr.h |
| Include Path | #include "UObject/PersistentObjectPtr.h" |
Syntax
template<class TObjectID>
struct TPersistentObjectPtr
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| Default constructor, will be null | UObject/PersistentObjectPtr.h | ||
TPersistentObjectPtr
(
const TObjectID& InObjectID |
Construct from a unique object identifier | UObject/PersistentObjectPtr.h |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| ElementType | TObjectID | UObject/PersistentObjectPtr.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| ObjectID | TObjectID | Guid for the object this pointer points to or will point to. | UObject/PersistentObjectPtr.h | |
| WeakPtr | FWeakObjectPtr | Once the object has been noticed to be loaded, this is set to the object weak pointer | UObject/PersistentObjectPtr.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| Dereference the lazy pointer, which may cause it to become valid again. | UObject/PersistentObjectPtr.h | ||
| Dereference the pointer, which may cause it to become valid again. | UObject/PersistentObjectPtr.h | ||
TObjectID & GetUniqueID () |
Non-const version of the above | UObject/PersistentObjectPtr.h | |
const TObjectID & GetUniqueID () |
Gets the unique object identifier associated with this lazy pointer. | UObject/PersistentObjectPtr.h | |
bool IsNull() |
Test if this can never point to a live UObject | UObject/PersistentObjectPtr.h | |
bool IsPending() |
Test if this does not point to a live UObject, but may in the future | UObject/PersistentObjectPtr.h | |
bool IsStale() |
Slightly different than !IsValid(), returns true if this used to point to a UObject, but doesn't any more and has not been assigned or reset in the mean time. | UObject/PersistentObjectPtr.h | |
bool IsValid() |
Test if this points to a live UObject | UObject/PersistentObjectPtr.h | |
void Reset() |
Reset the lazy pointer back to the null state | UObject/PersistentObjectPtr.h | |
void ResetWeakPtr() |
Resets the weak ptr only, call this when ObjectId may change | UObject/PersistentObjectPtr.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool operator!=
(
TYPE_OF_NULLPTR |
UObject/PersistentObjectPtr.h | ||
bool operator!=
(
const TPersistentObjectPtr& Rhs |
Compare pointers for inequality. Only Serial Number matters for the base implementation | UObject/PersistentObjectPtr.h | |
UObject & operator*() |
Dereference the pointer | UObject/PersistentObjectPtr.h | |
void operator=
(
const TObjectID& InObjectID |
Copy from a unique object identifier | UObject/PersistentObjectPtr.h | |
void operator=
(
FObjectPtr Object |
Copy from an object pointer | UObject/PersistentObjectPtr.h | |
| UObject/PersistentObjectPtr.h | |||
void operator=
(
TObjectPtr< T > Object |
UObject/PersistentObjectPtr.h | ||
void operator=
(
const FWeakObjectPtr& Other |
Copy from an existing weak pointer, reserve IDs if required | UObject/PersistentObjectPtr.h | |
bool operator==
(
const TPersistentObjectPtr& Rhs |
Compare pointers for equality. Only Serial Number matters for the base implementation | UObject/PersistentObjectPtr.h | |
bool operator==
(
TYPE_OF_NULLPTR |
UObject/PersistentObjectPtr.h | ||
UObject * operator->() |
Dereference the pointer | UObject/PersistentObjectPtr.h |