Navigation
API > API/Runtime > API/Runtime/Engine
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.
| Name | FPersistentObjectRef |
| Type | struct |
| Header File | /Engine/Source/Runtime/Engine/Public/TransactionCommon.h |
| Include Path | #include "TransactionCommon.h" |
Syntax
struct FPersistentObjectRef
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| TransactionCommon.h | |||
FPersistentObjectRef
(
UObject* InObject |
TransactionCommon.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| CachedRootObject | TWeakObjectPtr< UObject > | Cached pointers corresponding to RootObject when ReferenceType==SubObject ( |
cache needs testing on access as it may have become stale) | TransactionCommon.h | |
| CachedSubObjectHierarchy | TArray< TWeakObjectPtr< UObject >, TInlineAllocator< 4 > > | Cache of pointers corresponding to the items within SubObjectHierarchyIDs when ReferenceType==SubObject ( |
cache needs testing on access as it may have become stale) | TransactionCommon.h | |
| ReferenceType | EReferenceType | The reference type we're handling | TransactionCommon.h | |
| RootObject | TObjectPtr< UObject > | Stores the object pointer when ReferenceType==RootObject, and the outermost pointer of the sub-object chain when when ReferenceType==SubObject | TransactionCommon.h | |
| SubObjectHierarchyIDs | TArray< FName, TInlineAllocator< 4 > > | Stores the sub-object name chain when ReferenceType==SubObject | TransactionCommon.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AddReferencedObjects
(
FReferenceCollector& Collector |
TransactionCommon.h | ||
UObject * Get() |
TransactionCommon.h | ||
bool IsRootObjectReference() |
TransactionCommon.h | ||
bool IsSubObjectReference() |
TransactionCommon.h | ||
bool Serialize
(
FArchive& Ar |
TransactionCommon.h |