FPersistentObjectRef

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.

Windows
MacOS
Linux

References

Module

UnrealEd

Header

/Engine/Source/Editor/UnrealEd/Classes/Editor/Transactor.h

Include

#include "Editor/Transactor.h"

Syntax

struct FPersistentObjectRef

Remarks

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.

Variables

Name Description

Public variable

FName

 

ComponentName

Public variable

UObject *

 

Object

Public variable

EReferenceType

 

ReferenceType

Public variable

TArray < FName >

 

SubObjectHierarchyID

Constructors

Name Description

Public function

FPersistentObjectRef()

Public function

FPersistentObjectRef

(
    UObject * InObject
)

Functions

Name Description

Public function Const

UObject *...

 

Get()

Operators

Name Description

Public function Const

UObject *...

 

operator->()

Enums

Name

Description

Public enum

EReferenceType

This enum represents all of the different special cases we are handling with this type:

Select Skin
Light
Dark

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback