UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FDeferredInitializationTrackerBase Struct Reference

#include <BlueprintSupport.h>

+ Inheritance diagram for FDeferredInitializationTrackerBase:

Public Member Functions

virtual ~FDeferredInitializationTrackerBase ()
 
FObjectInitializerAdd (const UObject *InitDependency, const FObjectInitializer &DeferringInitializer)
 
void ResolveArchetypeInstances (UObject *ArchetypeKey)
 
bool IsInitializationDeferred (const UObject *Object) const
 
virtual bool DeferPreload (UObject *Object)
 

Protected Member Functions

bool IsResolving (UObject *ArchetypeInstance) const
 
virtual bool ResolveDeferredInitialization (UObject *ResolvingObject, UObject *ArchetypeInstance)
 
void PreloadDeferredDependents (UObject *ArchetypeInstance)
 

Protected Attributes

TMultiMap< const UObject *, UObject * > ArchetypeInstanceMap
 
TMap< UObject *, FObjectInitializerDeferredInitializers
 
TArray< UObject * > ResolvingObjects
 
TMultiMap< UObject *, UObject * > DeferredPreloads
 

Detailed Description

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).

Constructor & Destructor Documentation

◆ ~FDeferredInitializationTrackerBase()

virtual FDeferredInitializationTrackerBase::~FDeferredInitializationTrackerBase ( )
inlinevirtual

Member Function Documentation

◆ Add()

FObjectInitializer * FDeferredInitializationTrackerBase::Add ( const UObject InitDependency,
const FObjectInitializer DeferringInitializer 
)

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

Parameters
InitDependencyThe object (usually the initializer's archetype) that this initializer is dependent on. The key you'll pass to ResolveArchetypeInstances() later to run this initializer.
DeferringInitializerThe initializer you want to defer.

@raturn A copy of the specified initializer. This should always succeed (only returns null if InitDependency is null).

◆ DeferPreload()

bool FDeferredInitializationTrackerBase::DeferPreload ( UObject Object)
virtual

Determines if the specified object needs to have its Preload() call deferred (this is meant to be called from Preload() itself). If so, this will record the object and serialize it in later, once it's initializer dependency has been resolved (from ResolveArchetypeInstances).

This should be the case for any object that's had its initialization deferred (need to initialize before you serialize), and any dependencies (sub-objects, etc.) waiting on that object's initialization.

Returns
True if Object's load/serialization should be skipped (for now).

Reimplemented in FDeferredCdoInitializationTracker.

◆ IsInitializationDeferred()

bool FDeferredInitializationTrackerBase::IsInitializationDeferred ( const UObject Object) const

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).

◆ IsResolving()

bool FDeferredInitializationTrackerBase::IsResolving ( UObject ArchetypeInstance) const
protected

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

◆ PreloadDeferredDependents()

void FDeferredInitializationTrackerBase::PreloadDeferredDependents ( UObject ArchetypeInstance)
protected

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

◆ ResolveArchetypeInstances()

void FDeferredInitializationTrackerBase::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.

Parameters
ArchetypeKeyThe initializer dependency that has been fully loaded/serialized.

◆ ResolveDeferredInitialization()

bool FDeferredInitializationTrackerBase::ResolveDeferredInitialization ( UObject ResolvingObject,
UObject ArchetypeInstance 
)
protectedvirtual

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).

If the initializer needs to be further deferred, this should re-register under its new dependency.

Parameters
ResolvingObjectThe dependency that has been fully loaded/serialized, that the object's initializer was logged under.
ArchetypeInstanceThe object which has had its initializer deferred.
Returns
True if the initializer was ran, other wise false.

Reimplemented in FDeferredSubObjInitializationTracker.

Member Data Documentation

◆ ArchetypeInstanceMap

TMultiMap<const UObject*, UObject*> FDeferredInitializationTrackerBase::ArchetypeInstanceMap
protected

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

◆ DeferredInitializers

TMap<UObject*, FObjectInitializer> FDeferredInitializationTrackerBase::DeferredInitializers
protected

A map that lets us look up FObjectInitializers by their UObject

◆ DeferredPreloads

TMultiMap<UObject*, UObject*> FDeferredInitializationTrackerBase::DeferredPreloads
protected

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

◆ ResolvingObjects

TArray<UObject*> FDeferredInitializationTrackerBase::ResolvingObjects
protected

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


The documentation for this struct was generated from the following files: