engine
 
载入中...
搜索中...
未找到
静态 Public 成员函数 | 所有成员列表
FDeferredObjInitializationHelper结构体 参考

Access points for making FDeferredInitializationTracker calls. 更多...

#include <BlueprintSupport.h>

静态 Public 成员函数

static FObjectInitializer * DeferObjectInitializerIfNeeded (const FObjectInitializer &DeferringInitializer)
 Determines if the specified initializer needs to be deferred (does it have a archetype dependency that needs to be serialized first?). 更多...
 
static bool DeferObjectPreload (UObject *Object)
 Determines if the specified object should have its Preload() skipped. 更多...
 
static void ResolveDeferredInitsFromArchetype (UObject *Archetype)
 Loops through all object initializers and preloads that were skipped due to this archetype object not being ready yet. 更多...
 

详细描述

Access points for making FDeferredInitializationTracker calls.

Takes care of routing calls to the right tracker (CDOs vs sub-objects), and wraps the TThreadSingleton access for each.

成员函数说明

◆ DeferObjectInitializerIfNeeded()

static FObjectInitializer * FDeferredObjInitializationHelper::DeferObjectInitializerIfNeeded ( const FObjectInitializer &  DeferringInitializer)
static

Determines if the specified initializer needs to be deferred (does it have a archetype dependency that needs to be serialized first?).

If so, the FObjectInitializer will be copied and stored with the appropriate tracker (CDO vs. sub-object, etc.).

Designed to be called from the FObjectInitializer itself (before it runs initialization).

返回
A pointer to the initializer copy (if one was made), null if no deferral was needed.

◆ DeferObjectPreload()

static bool FDeferredObjInitializationHelper::DeferObjectPreload ( UObject *  Object)
static

Determines if the specified object should have its Preload() skipped.

If so, this should cache the sub-object so it can be loaded later, when its dependency is resolved.

Designed to be called from the Preload() itself (before it runs serializes the object).

More info: Because of delta serialization, we require that a parent's CDO be fully serialized before its children's CDOs are created. However, due to cyclic parent/child dependencies, we have some cases where the linker breaks that expected behavior. In those cases, we defer the child's initialization (i.e. defer copying of parent property values, etc.), and wait until we can guarantee that the parent CDO has been fully loaded.

In a normal scenario, the order of property initialization is: Creation (zeroed) -> Initialization (copied super's values) -> Serialization (overridden values loaded) When the initialization has been deferred we have to make sure to defer serialization here as well (don't worry, it will be invoked again from FinalizeBlueprint()->ResolveDeferredExports())

also, if this is an inherited sub-object on a CDO, and that CDO has had its initialization deferred (for reasons explained above), then we shouldn't serialize in data for this quite yet... not until its owner has had a chaTnce to initialize itself (because, as part of CDO initialization, inherited sub-objects get filled in with values inherited from the super)

返回
True if the object's Preload() should be skipped.

◆ ResolveDeferredInitsFromArchetype()

static void FDeferredObjInitializationHelper::ResolveDeferredInitsFromArchetype ( UObject *  Archetype)
static

Loops through all object initializers and preloads that were skipped due to this archetype object not being ready yet.

Should be called once the object has been fully serialized in.


该结构体的文档由以下文件生成: