FBlueprintCompileReinstancer

Windows
MacOS
Linux

Inheritance Hierarchy

TSharedFromThis

FGCObject

FBlueprintCompileReinstancer

References

Module

UnrealEd

Header

/Engine/Source/Editor/UnrealEd/Public/Kismet2/KismetReinstanceUtilities.h

Include

#include "Kismet2/KismetReinstanceUtilities.h"

Syntax

class FBlueprintCompileReinstancer :
    public TSharedFromThis< FBlueprintCompileReinstancer >,
    public FGCObject

Variables

Name Description

Protected variable

bool

 

bAllowResaveAtTheEndIfRequested

TRUE if this reinstancer should resave compiled Blueprints if the user has requested it

Protected variable

bool

 

bHasReinstanced

Whether or not this resinstancer has already reinstanced

Protected variable

bool

 

bIsRootReinstancer

TRUE if this is the root reinstancer that all other active reinstancing is spawned from

Protected variable

bool

 

bUseDeltaSerializationToCopyProperties

TRUE if delta serialization should be forced during FBlueprintCompileReinstancer::CopyPropertiesForUnrelatedObjects

Protected variable

TArray< UBluepr...

 

Children

Children of this blueprint, which will need to be recompiled and relinked temporarily to maintain the class layout

Protected variable

UClass *

 

ClassToReinstance

Reference to the class we're actively reinstancing

Protected variable

uint32

 

ClassToReinstanceDefaultValuesCRC

Protected variable

UClass *

 

DuplicatedClass

Reference to the duplicate of ClassToReinstance, which all previous instances are now instances of

Protected variable

TMap< FName, UF...

 

FunctionMap

Protected variable

TSet< UObject &...

 

ObjectsThatShouldUseOldStuff

Objects that should keep reference to old class

Protected variable

UObject *

 

OriginalCDO

The original CDO object for the class being actively reinstanced

Protected variable

TMap< FName, FP...

 

PropertyMap

Mappings from old fields before recompilation to their new equivalents

Protected variable

EReinstClassTyp...

 

ReinstClassType

Constructors

Name Description

Protected function

FBlueprintCompileReinstancer()

Default constructor, can only be used by derived classes

Protected function

FBlueprintCompileReinstancer

(
    UClass* InClassToReinstance,
    EBlueprintCompileReinstancerFlags F...
)

Sets the reinstancer up to work on every object of the specified class

Destructors

Functions

Name Description

Public function Static

void

 

BatchReplaceInstancesOfClass

(
    TMap< UClass*, UClass* > ...,
    const FBatchReplaceInstancesOfClass...
)

Batch replaces a mapping of one or more classes to their new class by leveraging ReplaceInstancesOfClass

Public function Virtual

void

 

BlueprintWasRecompiled

(
    UBlueprint* BP,
    bool bBytecodeOnly
)

Protected function

void

 

CompileChildren()

Protected function Static

void

 

CopyPropertiesForUnrelatedObjects

(
    UObject* OldObject,
    UObject* NewObject,
    bool bClearExternalReferences,
    bool bForceDeltaSerialization
)

Attempts to copy as many properties as possible from the old object to the new.

Public function Static

TSharedPtr< ...

 

Create

(
    UClass* InClassToReinstance,
    EBlueprintCompileReinstancerFlags F...
)

Public function Virtual

void

 

EnlistDependentBlueprintToRecompile

(
    UBlueprint* BP,
    bool bBytecodeOnly
)

Public function

void

 

FinalizeFastReinstancing

(
    TArray< UObject* >& ObjectsTo...
)

Public function

void

 

GenerateFieldMappings

(
    TMap< FFieldVariant, FFieldVariant ...
)

Helper to gather mappings from the old class's fields to the new class's version

Public function Static

void

 

GetSortedClassHierarchy

(
    UClass* ClassToSearch,
    TArray< UClass* >& OutHierarc...,
    UClass** OutNativeParent
)

Gathers the full class Hierarchy of the ClassToSearch, sorted top down (0 index being UObject, n being the subclasses)

Public function Virtual Const

bool

 

IsClassObjectReplaced()

Protected function Const

bool

 

IsReinstancingSkeleton()

Public function Static

bool

 

IsReinstClass

(
    const UClass* Class
)

Returns true if the given class is a REINST class (starts with the 'REINST_' prefix)

Public function

void

 

ListDependentBlueprintsToRefresh

(
    const TArray< UBlueprint* >& ...
)

Public function Static

UClass *

 

MoveCDOToNewClass

(
    UClass* OwnerClass,
    const TMap< UClass*, UClass&#...,
    bool bAvoidCDODuplication
)

Function used to safely discard a CDO, so that the class can have its layout changed, callers must move parent CDOs aside before moving child CDOs aside:

Public function Static

void

 

MoveDependentSkelToReinst

(
    UClass* OwnerClass,
    TMap< UClass*, UClass* > ...
)

Moves CDOs aside to immutable versions of classes(`REINST_) so that the CDO's can safely be GC'd.

Public function Static

void

 

OptionallyRefreshNodes

(
    UBlueprint* BP
)

Public function Static

void

 

ReconstructOwnerInstances

(
    TSubclassOf< UActorComponent > Comp...
)

When re-instancing a component, we have to make sure all instance owners' construction scripts are re-ran (in-case modifying the component alters the construction of the actor).

Protected function

TSharedPtr< ...

 

ReinstanceFast()

Protected function

TSharedPtr< ...

 

ReinstanceInner

(
    bool bForceAlwaysReinstance
)

Public function

void

 

ReinstanceObjects

(
    bool bForceAlwaysReinstance
)

Reinstances all objects in the ObjectReinstancingMap

Protected function

void

 

ReparentChild

(
    UBlueprint* ChildBP
)

Reparents the specified blueprint or class to be the duplicated class in order to allow properties to be copied from the previous CDO to the new one

Protected function

void

 

ReparentChild

(
    UClass* ChildClass
)

Reparents the specified blueprint or class to be the duplicated class in order to allow properties to be copied from the previous CDO to the new one

Public function Static

void

 

ReplaceInstancesOfClass

(
    UClass* OldClass,
    UClass* NewClass,
    UObject* OriginalCDO,
    TSet< UObject* >* Objects...,
    bool bClassObjectReplaced,
    bool bPreserveRootComponent
)

Worker function to replace all instances of OldClass with a new instance of NewClass

Public function Static

void

 

ReplaceInstancesOfClassEx

(
    const FReplaceInstancesOfClassParam...
)

Worker function to replace all instances of OldClass with a new instance of NewClass

Public function

void

 

SaveClassFieldMapping

(
    UClass* InClassToReinstance
)

Saves a mapping of field names to their UField equivalents, so we can remap any bytecode that references them later

Protected function Virtual Const

bool

 

ShouldPreserveRootComponentOfReinstancedActor()

Determine whether reinstancing actors should preserve the root component of the new actor

Public function

void

 

UpdateBytecodeReferences()

Updates references to properties and functions of the class that has in the bytecode of dependent blueprints

Public function

void

 

VerifyReplacement()

Verify that all instances of the duplicated class have been replaced and collected

Overridden from FGCObject

Name Description

Public function Virtual

void

 

AddReferencedObjects

(
    FReferenceCollector& Collector
)

Pure virtual that must be overloaded by the inheriting class.

Enums

Name

Description

Protected enum

EReinstClassType

Cached value, mostly used to determine if we're explicitly targeting the skeleton class or not

Constants

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss