![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <UObjectGlobals.h>
Static Public Member Functions | |
| static COREUOBJECT_API void | AssertIfInConstructor (UObject *Outer, const TCHAR *ErrorMessage) |
| static COREUOBJECT_API FObjectInitializer & | Get () |
Friends | |
| class | UObject |
| class | FScriptIntegrationObjectHelper |
| struct | FStaticConstructObjectParameters |
| template<class T > | |
| void | InternalConstructor (const class FObjectInitializer &X) |
Internal class to finalize UObject creation (initialize properties) after the real C++ constructor is called.
| FObjectInitializer::FObjectInitializer | ( | ) |
Default Constructor, used when you are using the C++ "new" syntax. UObject::UObject will set the object pointer
| FObjectInitializer::FObjectInitializer | ( | UObject * | InObj, |
| UObject * | InObjectArchetype, | ||
| EObjectInitializerOptions | InOptions, | ||
| struct FObjectInstancingGraph * | InInstanceGraph = nullptr |
||
| ) |
Constructor
| InObj | object to initialize, from static allocate object, after construction |
| InObjectArchetype | object to initialize properties from |
| InOptions | initialization options, see EObjectInitializerOptions |
| InInstanceGraph | passed instance graph |
| FObjectInitializer::FObjectInitializer | ( | UObject * | InObj, |
| const FStaticConstructObjectParameters & | StaticConstructParams | ||
| ) |
Special constructor for static construct object internal that passes along the params block directly
|
inline |
| FObjectInitializer::~FObjectInitializer | ( | ) |
Destructor for internal class to finalize UObject creation (initialize properties) after the real C++ constructor is called.
|
inline |
|
static |
Asserts with the specified message if code is executed inside UObject constructor
| UObject * FObjectInitializer::CreateDefaultSubobject | ( | UObject * | Outer, |
| FName | SubobjectFName, | ||
| const UClass * | ReturnType, | ||
| const UClass * | ClassToCreateByDefault, | ||
| bool | bIsRequired = true, |
||
| bool | bIsTransient = false |
||
| ) | const |
Create a component or subobject that will be instanced inside all instances of this class.
| Outer | outer to construct the subobject in |
| SubobjectName | name of the new component |
| ReturnType | class of return type, all overrides must be of this type |
| ClassToConstructByDefault | if the derived class has not overridden, create a component of this type |
| bIsRequired | true if the component is required and will always be created even if DoNotCreateDefaultSubobject was specified. |
| bIsTransient | true if the component is being assigned to a transient property |
|
inline |
Create a component or subobject that will be instanced inside all instances of this class.
| 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, this will be the same for all instances of this class |
| bTransient | true if the component is being assigned to a transient property |
|
inline |
Create a component or subobject, allows creating a child class and returning the parent class.
| TReturnType | class of return type, all overrides must be of this type |
| TClassToConstructByDefault | class to construct by default |
| Outer | outer to construct the subobject in |
| SubobjectName | name of the new component, this will be the same for all instances of this class |
| bTransient | true if the component is being assigned to a transient property |
|
inline |
Create a component or subobject only to be used with the editor.
| 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, this will be the same for all instances of this class |
| bTransient | true if the component is being assigned to a transient property |
| UObject * FObjectInitializer::CreateEditorOnlyDefaultSubobject | ( | UObject * | Outer, |
| FName | SubobjectName, | ||
| const UClass * | ReturnType, | ||
| bool | bTransient = false |
||
| ) | const |
Create a component or subobject only to be used with the editor.
| Outer | outer to construct the subobject in |
| SubobjectName | name of the new component, this will be the same for all instances of this class |
| ReturnType | type of the new component |
| bTransient | true if the component is being assigned to a transient property |
|
inline |
Create optional component or subobject. Optional subobjects will not get created. if a derived class specifies DoNotCreateDefaultSubobject with the subobject name.
| 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, this will be the same for all instances of this class |
| bTransient | true if the component is being assigned to a transient property |
|
inline |
Indicates that a base class should not create a component
| SubobjectName | name of the new component or subobject to not create |
|
inline |
Indicates that a subobject should not create a component if created using CreateOptionalDefaultSubobject
| SubobjectName | name of the new component or subobject to not create |
|
inline |
Indicates that a subobject should not create a component if created using CreateOptionalDefaultSubobject
| SubobjectName | name of the new component or subobject to not create |
|
inline |
|
static |
Gets ObjectInitializer for the currently constructed object. Can only be used inside of a constructor of UObject-derived class.
|
inline |
Return the archetype that this object will copy properties from later
| UClass * FObjectInitializer::GetClass | ( | ) | const |
Return the class of the object that is being constructed
|
inline |
|
inline |
Return the object that is being constructed
|
inline |
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.
| SubobjectName | name of the new component or subobject |
|
inline |
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.
| SubobjectName | name of the new component or subobject |
| Class | The class to use for the specified subobject or component. |
|
inline |
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.
| SubobjectName | path to the new component or subobject |
|
inline |
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.
| SubobjectName | path to the new component or subobject |
| Class | The class to use for the specified subobject or component. |
|
inline |
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.
| SubobjectName | path to the new component or subobject |
|
inline |
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.
| SubobjectName | path to the new component or subobject |
| Class | The class to use for the specified subobject or component. |
|
friend |
|
friend |