FObjectInitializer

Internal class to finalize [UObject](API\Runtime\CoreUObject\UObject\UObject) creation (initialize properties) after the real C++ constructor is called.

Windows
MacOS
Linux

References

Module

CoreUObject

Header

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

Include

#include "UObject/UObjectGlobals.h"

Syntax

class FObjectInitializer

Remarks

Internal class to finalize UObject creation (initialize properties) after the real C++ constructor is called.

Constructors

Name Description

Public function

FObjectInitializer()

Default Constructor, used when you are using the C++ "new" syntax.

Public function

FObjectInitializer

(
    UObject* InObj,
    UObject* InObjectArchetype,
    bool bInCopyTransientsFromClassDefa...,
    bool bInShouldInitializeProps,
    FObjectInstancingGraph* InInst...
)

Constructor

Destructors

Name Description

Public function

~FObjectInitializer()

Destructor for internal class to finalize UObject creation (initialize properties) after the real C++ constructor is called.

Functions

Name Description

Public function Static

void

 

AssertIfInConstructor

(
    UObject* Outer,
    const TCHAR* ErrorMessage
)

Asserts with the specified message if code is executed inside UObject constructor

Public function Const

TReturnType ...

 

CreateDefaultSubobject

(
    UObject* Outer,
    FName SubobjectName,
    bool bTransient
)

Create a component or subobject

Public function Const

TReturnType ...

 

CreateDefaultSubobject

(
    UObject* Outer,
    FName SubobjectName,
    bool bTransient
)

Create a component or subobject

Public function Const

UObject *...

 

CreateDefaultSubobject

(
    UObject* Outer,
    FName SubobjectFName,
    UClass* ReturnType,
    UClass* ClassToCreateByDefault,
    bool bIsRequired,
    bool bIsTransient
)

Create a component or subobject

Public function Const

TReturnType ...

 

CreateEditorOnlyDefaultSubobject

(
    UObject* Outer,
    FName SubobjectName,
    bool bTransient
)

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

Public function Const

UObject *...

 

CreateEditorOnlyDefaultSubobject

(
    UObject* Outer,
    FName SubobjectName,
    UClass* ReturnType,
    bool bTransient
)

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

Public function Const

TReturnType ...

 

CreateOptionalDefaultSubobject

(
    UObject* Outer,
    FName SubobjectName,
    bool bTransient
)

Create optional component or subobject.

Public function Const

FObjectIniti...

 

DoNotCreateDefaultSubobject

(
    FName SubobjectName
)

Indicates that a base class should not create a component

Public function

void

 

FinalizeSubobjectClassInitialization()

Public function Static

FObjectIniti...

 

Get()

Gets ObjectInitializer for the currently constructed object.

Public function Const

UObject *...

 

GetArchetype()

Return the archetype that this object will copy properties from later

Public function Const

UClass *

 

GetClass()

Return the class of the object that is being constructed

Public function Const

UObject *...

 

GetObj()

Return the object that is being constructed

Public function Const

FObjectIniti...

 

SetDefaultSubobjectClass

(
    FName SubobjectName
)

Sets the class to use for a subobject defined in a base class, the class must be a subclass of the class used by the base class.

Public function Const

FObjectIniti...

 

SetDefaultSubobjectClass

(
    FName SubobjectName,
    UClass* Class
)

Sets the class to use for a subobject defined in a base class, the class must be a subclass of the class used by the base class.

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