Language:
Discover
By Skill Level
By Category

FObjectInitializer::CreateOptionalDefaultSubobject

Choose your OS:

Syntax

template<class TReturnType>
TReturnType * CreateOptionalDefaultSubobject
(
    UObject * Outer,
    FName SubobjectName,
    bool bTransient
)

Remarks

Create optional component or subobject. Optional subobjects may not get created when a derived class specified DoNotCreateDefaultSubobject with the subobject's name.

Parameters

Parameter

Description

TReturnType

class of return type, all overrides must be of this type

Outer

outer to construct the subobject in

SubobjectName

name of the new component

bTransient

true if the component is being assigned to a transient property

References

Module

CoreUObject

Header

Runtime/CoreUObject/Public/UObject/UObjectGlobals.h