FObjectInitializer::CreateAbstractDefaultSubobject

Create optional component or subobject.

Windows
MacOS
Linux

Deprecated

  • CreateAbstract did not work as intended and has been deprecated in favor of CreateDefaultObject

References

Module

CoreUObject

Header

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

Include

#include "UObject/UObjectGlobals.h"

Syntax

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

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 Create a subobject that has the Abstract class flag, child classes are expected to override this by calling SetDefaultSubobjectClass with the same name and a non-abstract class.

TReturnType

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

SubobjectName

Name of the new component

bTransient

True if the component is being assigned to a transient property. This does not make the component itself transient, but does stop it from inheriting parent defaults

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