Navigation
API > API/Runtime > API/Runtime/CoreUObject > API/Runtime/CoreUObject/UObject
Overloads
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TReturnType * CreateOptionalDefaultSubobject
(
FName SubobjectName, |
Create an optional component or subobject.Optional subobjects will not get created. | UObject/Object.h | |
TReturnType * CreateOptionalDefaultSubobject
(
FName SubobjectName, |
Create an optional component or subobject. | UObject/Object.h |
CreateOptionalDefaultSubobject(FName, bool)
Description
Create an optional component or subobject.Optional subobjects will not get created. if a derived class specifies DoNotCreateDefaultSubobject with the subobject name.
| Name | CreateOptionalDefaultSubobject |
| Type | function |
| Header File | /Engine/Source/Runtime/CoreUObject/Public/UObject/Object.h |
| Include Path | #include "UObject/Object.h" |
template<class TReturnType>
TReturnType * CreateOptionalDefaultSubobject
(
FName SubobjectName,
bool bTransient
)
Parameters
| Name | Remarks |
|---|---|
| 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 |
CreateOptionalDefaultSubobject(FName, bool)
Description
Create an optional component or subobject. Optional subobjects will not get created. if a derived class specifies DoNotCreateDefaultSubobject with the subobject name.
| Name | CreateOptionalDefaultSubobject |
| Type | function |
| Header File | /Engine/Source/Runtime/CoreUObject/Public/UObject/Object.h |
| Include Path | #include "UObject/Object.h" |
template<class TReturnType, class TClassToConstructByDefault>
TReturnType * CreateOptionalDefaultSubobject
(
FName SubobjectName,
bool bTransient
)
Parameters
| Name | Remarks |
|---|---|
| TReturnType | Class of return type, all overrides must be of this type |
| TClassToConstructByDefault | Class of object to actually construct, must be a subclass of TReturnType |
| 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 |