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). 更多...
#include <BlueprintSupport.h>
类 FDeferredInitializationTrackerBase 继承关系图:Public 成员函数 | |
| FObjectInitializer * | Add (const UObject *InitDependecy, 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(). 更多... | |
| 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). 更多... | |
| bool | 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). | |
| 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 成员函数 | |
| bool | IsResolving (UObject *ArchetypeInstance) const |
| Used to keep DeferPreload() from re-adding objects while we're in the midst of resolving. | |
| void | PreloadDeferredDependents (UObject *ArchetypeInstance) |
| Runs through all objects that had their Preload() skipped due to an initializer being deferred. 更多... | |
| 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). 更多... | |
Protected 属性 | |
| TMultiMap< const UObject *, UObject * > | ArchetypeInstanceMap |
| Tracks objects that have had their initialization deferred as a result of their archetype not being fully serialized (maps archetype => list-o-instances) | |
| TMap< UObject *, FObjectInitializer > | DeferredInitializers |
| A map that lets us look up FObjectInitializers by their UObject | |
| TMultiMap< UObject *, UObject * > | DeferredPreloads |
| Track default objects that had their Preload() skipped, because a archetype dependency should initialize first | |
| TArray< UObject * > | ResolvingObjects |
| Used to keep ResolveArchetypeInstances() from re-adding sub-objects via DeferPreload() | |
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).
| FObjectInitializer * FDeferredInitializationTrackerBase::Add | ( | const UObject * | InitDependecy, |
| 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().
| InitDependecy | The object (usually the initializer's archetype) that this initializer is dependent on. The key you'll pass to ResolveArchetypeInstances() later to run this initializer. |
| DeferringInitializer | The initializer you want to defer. |
@raturn A copy of the specified initializer. This should always succeed (only returns null if InitDependecy is null).
|
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.
|
protected |
Runs through all objects that had their Preload() skipped due to an initializer being deferred.
Runs serialization on each object.
| 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.
| ArchetypeKey | The initializer dependency that has been fully loaded/serialized. |
|
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.
| ResolvingObject | The dependency that has been fully loaded/serialized, that the object's initializer was logged under. |
| ArchetypeInstance | The object which has had its initializer deferred. |