UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
UE::Transaction::FPersistentObjectRef Struct Reference

#include <TransactionCommon.h>

Public Member Functions

 FPersistentObjectRef ()=default
 
ENGINE_API FPersistentObjectRef (UObject *InObject)
 
bool Serialize (FArchive &Ar)
 
bool IsRootObjectReference () const
 
bool IsSubObjectReference () const
 
ENGINE_API UObjectGet () const
 
ENGINE_API void AddReferencedObjects (FReferenceCollector &Collector)
 

Friends

FArchiveoperator<< (FArchive &Ar, FPersistentObjectRef &ReferencedObject)
 
bool operator== (const FPersistentObjectRef &LHS, const FPersistentObjectRef &RHS)
 
bool operator!= (const FPersistentObjectRef &LHS, const FPersistentObjectRef &RHS)
 
uint32 GetTypeHash (const FPersistentObjectRef &InObjRef)
 

Detailed Description

This type is necessary because the blueprint system is destroying and creating CDOs at edit time (usually on compile, but also on load), but also stores user entered data in the CDO. We "need" changes to a CDO to persist across instances because as we undo and redo we need to apply changes to different instances of the CDO - alternatively we could destroy and create the CDO as part of a transaction (this alternative is the reason for the bunny ears around need).

DanO: My long term preference is for the editor to use a dynamic, mutable type (rather than the CDO) to store editor data. The CDO can then be re-instanced (or not) as runtime code requires.

Constructor & Destructor Documentation

◆ FPersistentObjectRef() [1/2]

UE::Transaction::FPersistentObjectRef::FPersistentObjectRef ( )
default

◆ FPersistentObjectRef() [2/2]

UE::Transaction::FPersistentObjectRef::FPersistentObjectRef ( UObject InObject)
explicit

Member Function Documentation

◆ AddReferencedObjects()

void UE::Transaction::FPersistentObjectRef::AddReferencedObjects ( FReferenceCollector Collector)

◆ Get()

UObject * UE::Transaction::FPersistentObjectRef::Get ( ) const

◆ IsRootObjectReference()

bool UE::Transaction::FPersistentObjectRef::IsRootObjectReference ( ) const
inline

◆ IsSubObjectReference()

bool UE::Transaction::FPersistentObjectRef::IsSubObjectReference ( ) const
inline

◆ Serialize()

bool UE::Transaction::FPersistentObjectRef::Serialize ( FArchive Ar)
inline

Friends And Related Symbol Documentation

◆ GetTypeHash

uint32 GetTypeHash ( const FPersistentObjectRef InObjRef)
friend

◆ operator!=

bool operator!= ( const FPersistentObjectRef LHS,
const FPersistentObjectRef RHS 
)
friend

◆ operator<<

FArchive & operator<< ( FArchive Ar,
FPersistentObjectRef ReferencedObject 
)
friend

◆ operator==

bool operator== ( const FPersistentObjectRef LHS,
const FPersistentObjectRef RHS 
)
friend

The documentation for this struct was generated from the following files: