Navigation
API > API/Runtime > API/Runtime/CoreUObject
Internal class to finalize UObject creation (initialize properties) after the real C++ constructor is called.
| Name | FObjectInitializer |
| Type | class |
| Header File | /Engine/Source/Runtime/CoreUObject/Public/UObject/UObjectGlobals.h |
| Include Path | #include "UObject/UObjectGlobals.h" |
Syntax
class FObjectInitializer
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FObjectInitializer
(
UObject* InObj, |
Constructor | UObject/UObjectGlobals.h | |
FObjectInitializer
(
UObject* InObj, |
UObject/UObjectGlobals.h | ||
| Default Constructor, used when you are using the C++ "new" syntax. | UObject/UObjectGlobals.h | ||
FObjectInitializer
(
UObject* InObj, |
Special constructor for static construct object internal that passes along the params block directly | UObject/UObjectGlobals.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
~FObjectInitializer() |
Destructor for internal class to finalize UObject creation (initialize properties) after the real C++ constructor is called. | UObject/UObjectGlobals.h |
Structs
| Name | Remarks |
|---|---|
| FOverrides | Little helper struct to manage overrides from derived classes |
| FSubobjectsToInit | Little helper struct to manage overrides from derived classes |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bCopyTransientsFromClassDefaults | bool | If true, copy the transients from the DefaultsClass defaults, otherwise copy the transients from DefaultData | UObject/UObjectGlobals.h | |
| bIsDeferredInitializer | bool | UObject/UObjectGlobals.h | ||
| bShouldInitializePropsFromArchetype | bool | If true, initialize the properties | UObject/UObjectGlobals.h | |
| bSubobjectClassInitializationAllowed | bool | Only true until ObjectInitializer has not reached the base UObject class | UObject/UObjectGlobals.h | |
| ComponentInits | FSubobjectsToInit | List of component classes to initialize after the C++ constructors | UObject/UObjectGlobals.h | |
| ConstructedSubobjects | TArray< FName, TInlineAllocator< 8 > > | List of all subobject names constructed for this object | UObject/UObjectGlobals.h | |
| CreatedGCObjects | TArray< FGCObject * > | List of FGCObjects created during UObject construction | UObject/UObjectGlobals.h | |
| InstanceGraph | FObjectInstancingGraph * | Instance graph | UObject/UObjectGlobals.h | |
| LastConstructedObject | UObject * | Previously constructed object in the callstack | UObject/UObjectGlobals.h | |
| Obj | UObject * | Object to initialize, from static allocate object, after construction | UObject/UObjectGlobals.h | |
| ObjectArchetype | UObject * | Object to copy properties from | UObject/UObjectGlobals.h | |
| OnGCObjectCreatedHandle | FDelegateHandle | Delegate handle for OnGCObjectCreated callback | UObject/UObjectGlobals.h | |
| PropertyInitCallback | TFunction< void()> | Callbacks for custom property initialization before PostInitProperties gets called | UObject/UObjectGlobals.h | |
| PropertyPostInitCallbacks | TArray< TFunction< void()> > | UObject/UObjectGlobals.h | ||
| SubobjectOverrides | FOverrides | List of component classes to override from derived classes | UObject/UObjectGlobals.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AddPropertyPostInitCallback
(
TFunction< void()>&& Callback |
UObject/UObjectGlobals.h | ||
TReturnType * CreateDefaultSubobject
(
UObject* Outer, |
Create a component or subobject that will be instanced inside all instances of this class. | UObject/UObjectGlobals.h | |
| Create a component or subobject that will be instanced inside all instances of this class. | UObject/UObjectGlobals.h | ||
TReturnType * CreateDefaultSubobject
(
UObject* Outer, |
Create a component or subobject, allows creating a child class and returning the parent class. | UObject/UObjectGlobals.h | |
UObject * CreateEditorOnlyDefaultSubobject
(
UObject* Outer, |
Create a component or subobject only to be used with the editor. | UObject/UObjectGlobals.h | |
TReturnType * CreateEditorOnlyDefaultSubobject
(
UObject* Outer, |
Create a component or subobject only to be used with the editor. | UObject/UObjectGlobals.h | |
TReturnType * CreateOptionalDefaultSubobject
(
UObject* Outer, |
Create optional component or subobject. | UObject/UObjectGlobals.h | |
const FObjectInitializer & DoNotCreateDefaultSubobject
(
FName SubobjectName |
Indicates that a base class should not create a component | UObject/UObjectGlobals.h | |
const FObjectInitializer & DoNotCreateNestedDefaultSubobject
(
TArrayView< const FName > SubobjectNames |
Indicates that a subobject should not create a component if created using CreateOptionalDefaultSubobject | UObject/UObjectGlobals.h | |
const FObjectInitializer & DoNotCreateNestedDefaultSubobject
(
FStringView SubobjectName |
Indicates that a subobject should not create a component if created using CreateOptionalDefaultSubobject | UObject/UObjectGlobals.h | |
void FinalizeSubobjectClassInitialization() |
UObject/UObjectGlobals.h | ||
UObject * GetArchetype() |
Return the archetype that this object will copy properties from later | UObject/UObjectGlobals.h | |
UClass * GetClass() |
Return the class of the object that is being constructed | UObject/UObjectGlobals.h | |
FObjectInstancingGraph * GetInstancingGraph() |
UObject/UObjectGlobals.h | ||
UObject * GetObj() |
Return the object that is being constructed | UObject/UObjectGlobals.h | |
const FObjectInitializer & 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. | UObject/UObjectGlobals.h | |
const FObjectInitializer & 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. | UObject/UObjectGlobals.h | |
const FObjectInitializer & SetNestedDefaultSubobjectClass
(
FStringView SubobjectName |
Sets the class to use for a subobject defined in a nested subobject, the class must be a subclass of the class used when calling CreateDefaultSubobject. | UObject/UObjectGlobals.h | |
const FObjectInitializer & SetNestedDefaultSubobjectClass
(
TArrayView< const FName > SubobjectNames |
Sets the class to use for a subobject defined in a nested subobject, the class must be a subclass of the class used when calling CreateDefaultSubobject. | UObject/UObjectGlobals.h | |
const FObjectInitializer & SetNestedDefaultSubobjectClass
(
FStringView SubobjectName, |
Sets the class to use for a subobject defined in a nested subobject, the class must be a subclass of the class used when calling CreateDefaultSubobject. | UObject/UObjectGlobals.h | |
const FObjectInitializer & SetNestedDefaultSubobjectClass
(
TArrayView< const FName > SubobjectNames, |
Sets the class to use for a subobject defined in a nested subobject, the class must be a subclass of the class used when calling CreateDefaultSubobject. | UObject/UObjectGlobals.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static void AssertIfInConstructor
(
UObject* Outer, |
Asserts with the specified message if code is executed inside UObject constructor | UObject/UObjectGlobals.h | |
static FObjectInitializer & Get () |
Gets ObjectInitializer for the currently constructed object. | UObject/UObjectGlobals.h | |
static bool InitNonNativeProperty
(
FProperty* Property, |
Initializes a non-native property, according to the initialization rules. | UObject/UObjectGlobals.h | |
| Binary initialize object properties to zero or defaults. | UObject/UObjectGlobals.h |