UObject::CreateEditorOnlyDefaultSubobject

Create a component or subobject only to be used with the editor.

Windows
MacOS
Linux

References

Module

CoreUObject

Header

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

Include

#include "UObject/Object.h"

Syntax

template<class TReturnType>
TReturnType * CreateEditorOnlyDefaultSubobject
(
    FName SubobjectName,
    bool bTransient
)

Remarks

Create a component or subobject only to be used with the editor. They will be stripped out in packaged builds.

Parameters

Parameter

Description

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