Navigation
API > API/Editor > API/Editor/UnrealEd > API/Editor/UnrealEd/Kismet2
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
| Type | Name | Description | |
|---|---|---|---|
| bool | bAllowResaveAtTheEndIfRequested | TRUE if this reinstancer should resave compiled Blueprints if the user has requested it | |
| bool | bHasReinstanced | Whether or not this resinstancer has already reinstanced | |
| bool | bIsRootReinstancer | TRUE if this is the root reinstancer that all other active reinstancing is spawned from | |
| bool | bUseDeltaSerializationToCopyProperties | TRUE if delta serialization should be forced during FBlueprintCompileReinstancer::CopyPropertiesForUnrelatedObjects | |
| TArray< UBlueprint * > | Children | Children of this blueprint, which will need to be recompiled and relinked temporarily to maintain the class layout | |
| UClass * | ClassToReinstance | Reference to the class we're actively reinstancing | |
| uint32 | ClassToReinstanceDefaultValuesCRC | ||
| TObjectPtr< UClass > | DuplicatedClass | Reference to the duplicate of ClassToReinstance, which all previous instances are now instances of | |
| TMap< FName, TObjectPtr< UFunction > > | FunctionMap | ||
| TSet< UObject * > | ObjectsThatShouldUseOldStuff | Objects that should keep reference to old class | |
| TObjectPtr< UObject > | OriginalCDO | The original CDO object for the class being actively reinstanced | |
| void * | OriginalSCD | The original Sparse Class Data object for the class being actively reinstanced | |
| TObjectPtr< UScriptStruct > | OriginalSCDStruct | The original SDO Struct for the class being actively reinstanced | |
| TMap< FName, FProperty * > | PropertyMap | Mappings from old fields before recompilation to their new equivalents | |
| EReinstClassType | ReinstClassType | ||
| TArray< uint8 > | SCDSnapshot | A snapshot of the SCD, currently delta serialized from its archetype - taken before ownership of SCDs is taken |
Constructors
| Type | Name | Description | |
|---|---|---|---|
| Default constructor, can only be used by derived classes | |||
FBlueprintCompileReinstancer
(
UClass* InClassToReinstance, |
Sets the reinstancer up to work on every object of the specified class |
Destructors
| Type | Name | Description | |
|---|---|---|---|
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | BatchReplaceInstancesOfClass
(
const TMap< UClass*, UClass* >& InOldToNewClassMap, |
Batch replaces a mapping of one or more classes to their new class | |
| void | BatchReplaceInstancesOfClass
(
TMap< UClass*, UClass* >& InOldToNewClassMap, |
||
| void | BlueprintWasRecompiled
(
UBlueprint* BP, |
||
| void | |||
| void | Attempts to copy as many properties as possible from the old object to the new. | ||
| TSharedPtr< FBlueprintCompileReinstancer > | Create
(
UClass* InClassToReinstance, |
||
| void | FinalizeFastReinstancing
(
TArray< UObject* >& ObjectsToReplace |
||
| void | FinishUpdateBytecodeReferences
(
const TSet< UBlueprint* >& DependentBPs, |
Consumes the set and map populated by calls to UpdateBytecodeReferences | |
| void | GenerateFieldMappings
(
TMap< FFieldVariant, FFieldVariant >& FieldMapping |
Helper to gather mappings from the old class's fields to the new class's version | |
| void | GetSortedClassHierarchy
(
UClass* ClassToSearch, |
Gathers the full class Hierarchy of the ClassToSearch, sorted top down (0 index being UObject, n being the subclasses) | |
| bool | |||
| bool | |||
| bool | IsReinstClass
(
const UClass* Class |
Returns true if the given class is a REINST class (starts with the 'REINST_' prefix) | |
| UClass * | MoveCDOToNewClass
(
UClass* OwnerClass, |
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: | |
| void | MoveDependentSkelToReinst
(
UClass* OwnerClass, |
Moves CDOs aside to immutable versions of classes(`REINST_) so that the CDO's can safely be GC'd. | |
| void | OptionallyRefreshNodes
(
UBlueprint* BP |
||
| void | PreCreateSubObjectsForReinstantiation
(
const TMap< UClass*, UClass* >& OldToNewClassMap, |
This method will pre-create all non-default sub object needed for a re-instantiation, what is left is to CopyPropertiesForUnrelatedObjects on the created instances map to finish the re-instancing If the re-instancing is done in a big batch and part to the sub object might already be re-instantiated, you will need to provide those via the OldToNewInstanceMap | |
| void | PropagateSparseClassDataToNewClass
(
UClass* NewClass |
Copies an owned sparse class data instance to a new class and frees any owned SCD | |
| void | ReconstructOwnerInstances
(
TSubclassOf< UActorComponent > ComponentClass |
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). | |
| TSharedPtr< FReinstanceFinalizer > | |||
| TSharedPtr< FReinstanceFinalizer > | ReinstanceInner
(
bool bForceAlwaysReinstance |
||
| void | ReinstanceObjects
(
bool bForceAlwaysReinstance |
Reinstances all objects in the ObjectReinstancingMap | |
| 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 | |
| void | ReparentChild
(
UClass* ChildClass |
||
| void | ReplaceInstancesOfClass
(
UClass* OldClass, |
Replace all instances of OldClass with a new instance of NewClass | |
| void | @todo_deprecated - To be removed in a future release. | ||
| void | ReplaceInstancesOfClassEx
(
const FReplaceInstancesOfClassParameters& Parameters |
||
| void | SaveClassFieldMapping
(
UClass* InClassToReinstance |
Saves a mapping of field names to their UField equivalents, so we can remap any bytecode that references them later | |
| void | SaveSparseClassData
(
const UClass* ForClass |
Populates SCDSnapshot, for use via PropagateSparseClassDataToNewClass | |
| bool | Determine whether reinstancing actors should preserve the root component of the new actor | ||
| void | TakeOwnershipOfSparseClassData
(
UClass* ForClass |
Instructs the reinstancer to take ownership of the sparse class data - doing so will make it difficult to identify archetype data | |
| void | UpdateBytecodeReferences
(
TSet< UBlueprint* >& OutDependentBlueprints, |
Updates references to properties and functions of the class that has in the bytecode of dependent blueprints | |
| void | Verify that all instances of the duplicated class have been replaced and collected |
Overridden from FGCObject
| Type | Name | Description | |
|---|---|---|---|
| void | AddReferencedObjects
(
FReferenceCollector& Collector |
Pure virtual that must be overloaded by the inheriting class. | |
| FString | Overload this method to report a name for your referencer |
Enums
| Type | Name | Description | |
|---|---|---|---|
| EReinstClassType | Cached value, mostly used to determine if we're explicitly targeting the skeleton class or not |
Constants
| Name | Description |
|---|---|
| CompiledBlueprintsToSave | |
| HotReloadedNewClass | |
| HotReloadedOldClass |