FObjectInstancingGraph::GetInstancedSubobject

Returns the component that has SourceComponent as its archetype, instancing the component as necessary.

Windows
MacOS
Linux

References

Module

CoreUObject

Header

/Engine/Source/Runtime/CoreUObject/Public/UObject/Class.h

Include

#include "UObject/Class.h"

Source

/Engine/Source/Runtime/CoreUObject/Private/UObject/CoreNative.cpp

Syntax

UObject * GetInstancedSubobject
(
    class UObject * SourceSubobject,
    class UObject * CurrentValue,
    class UObject * CurrentObject,
    bool bDoNotCreateNewInstance,
    bool bAllowSelfReference
)

Remarks

Returns the component that has SourceComponent as its archetype, instancing the component as necessary.

Returns

if SourceComponent is contained within SourceRoot, returns a pointer to a unique component instance corresponding to SourceComponent if SourceComponent is allowed to be instanced in this context, or NULL if the component isn't allowed to be instanced at this time (such as when we're a client and the component isn't loaded on clients) if SourceComponent is not contained by SourceRoot, return INVALID_OBJECT, indicating that the that has SourceComponent as its ObjectArchetype, or NULL if SourceComponent is not contained within SourceRoot.

Parameters

Parameter

Description

SourceComponent

the component to find the corresponding component instance for

CurrentValue

the component currently assigned as the value for the component property being instanced. Used when updating archetypes to ensure that the new instanced component replaces the existing component instance in memory.

CurrentObject

the object that owns the component property currently being instanced; this is NOT necessarily the object that should be the Outer for the new component.

bDoNotCreateNewInstance

If true, then we do not create a new instance, but we will reassign one if there is already a mapping in the table

bAllowSelfReference

If true, instance the reference to the subobjectroot, so far only delegates remap a self reference

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