FDeferredInitializationTrackerBase

A base struct for storing FObjectInitializers that were not run on Blueprint objects post-construction (presumably because the object's super/archetype had not been fully serialized yet).

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

CoreUObject

Header

/Engine/Source/Runtime/CoreUObject/Public/Blueprint/BlueprintSupport.h

Include

#include "Blueprint/BlueprintSupport.h"

Syntax

struct FDeferredInitializationTrackerBase

Remarks

A base struct for storing FObjectInitializers that were not run on Blueprint objects post-construction (presumably because the object's super/archetype had not been fully serialized yet).

This was designed to hold onto FObjectInitializers until a later point, when they can properly be ran (after the archetype has been serialized).

Variables

Name Description

Protected variable

TMultiMap< cons...

 

ArchetypeInstanceMap

Tracks objects that have had their initialization deferred as a result of their archetype not being fully serialized (maps archetype => list-o-instances)

Protected variable

TMap< UObject &...

 

DeferredInitializers

A map that lets us look up FObjectInitializers by their UObject

Protected variable

TMultiMap< UObj...

 

DeferredPreloads

Track default objects that had their Preload() skipped, because a archetype dependency should initialize first

Protected variable

TArray< UObject...

 

ResolvingObjects

Used to keep ResolveArchetypeInstances() from re-adding sub-objects via DeferPreload()

Destructors

Functions

Name Description

Public function

FObjectIniti...

 

Add

(
    const UObject* InitDependecy,
    const FObjectInitializer& Deferrin...
)

Makes a copy of the specified initializer and stores it (mapped under its dependency), so that it can instead be executed later via ResolveArchetypeInstances().

Public function Virtual

bool

 

DeferPreload

(
    UObject* Object
)

Determines if the specified object needs to have its Preload() call deferred (this is meant to be called from Preload() itself).

Public function Const

bool

 

IsInitializationDeferred

(
    const UObject* Object
)

Checks to see if the specified object has had its initialization deferred (meaning a super/archetype hasn't had FObjectInitializer::PostConstructInit() ran on it yet).

Protected function Const

bool

 

IsResolving

(
    UObject* ArchetypeInstance
)

Used to keep DeferPreload() from re-adding objects while we're in the midst of resolving.

Protected function

void

 

PreloadDeferredDependents

(
    UObject* ArchetypeInstance
)

Runs through all objects that had their Preload() skipped due to an initializer being deferred.

Public function

void

 

ResolveArchetypeInstances

(
    UObject* ArchetypeKey
)

Runs all deferred initializers that were dependent on the specified archetype (unless they're dependent on another), and runs Preload() on any objects that had their Preload() skipped as a result.

Protected function Virtual

bool

 

ResolveDeferredInitialization

(
    UObject* ResolvingObject,
    UObject* ArchetypeInstance
)

Runs the deferred initializer for the specified archetype object if its not dependent on other archetypes (like a sub-object that first requires the super's CDO to be constructed, and then for its archetype to be serialized).

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