Internal class to finalize UObject creation (initialize properties) after the real C++ constructor is called. 更多...
#include <UObjectGlobals.h>
Public 成员函数 | |
| UObject * | CreateDefaultSubobject (UObject *Outer, FName SubobjectFName, UClass *ReturnType, UClass *ClassToCreateByDefault, bool bIsRequired, bool bIsTransient) const |
| Create a component or subobject 更多... | |
| template<class TReturnType > | |
| TReturnType * | CreateDefaultSubobject (UObject *Outer, FName SubobjectName, bool bTransient=false) const |
| Create a component or subobject 更多... | |
| template<class TReturnType , class TClassToConstructByDefault > | |
| TReturnType * | CreateDefaultSubobject (UObject *Outer, FName SubobjectName, bool bTransient=false) const |
| Create a component or subobject 更多... | |
| template<class TReturnType > | |
| TReturnType * | CreateEditorOnlyDefaultSubobject (UObject *Outer, FName SubobjectName, bool bTransient=false) const |
| Create a component or subobject only to be used with the editor. 更多... | |
| UObject * | CreateEditorOnlyDefaultSubobject (UObject *Outer, FName SubobjectName, UClass *ReturnType, bool bTransient=false) const |
| Create a component or subobject only to be used with the editor. 更多... | |
| template<class TReturnType > | |
| TReturnType * | CreateOptionalDefaultSubobject (UObject *Outer, FName SubobjectName, bool bTransient=false) const |
| Create optional component or subobject. 更多... | |
| FObjectInitializer const & | DoNotCreateDefaultSubobject (FName SubobjectName) const |
| Indicates that a base class should not create a component 更多... | |
| FObjectInitializer () | |
| Default Constructor, used when you are using the C++ "new" syntax. 更多... | |
| FObjectInitializer (UObject *InObj, UObject *InObjectArchetype, bool bInCopyTransientsFromClassDefaults, bool bInShouldInitializeProps, struct FObjectInstancingGraph *InInstanceGraph=nullptr) | |
| Constructor 更多... | |
| FORCEINLINE UObject * | GetArchetype () const |
| Return the archetype that this object will copy properties from later | |
| UClass * | GetClass () const |
| Return the class of the object that is being constructed | |
| FORCEINLINE UObject * | GetObj () const |
| Return the object that is being constructed | |
| template<class T > | |
| FObjectInitializer const & | SetDefaultSubobjectClass (FName SubobjectName) const |
| 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. 更多... | |
| FObjectInitializer const & | SetDefaultSubobjectClass (FName SubobjectName, UClass *Class) const |
| 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 成员函数 | |
| static void | AssertIfInConstructor (UObject *Outer, const TCHAR *ErrorMessage) |
| Asserts with the specified message if code is executed inside UObject constructor | |
| static FObjectInitializer & | Get () |
| Gets ObjectInitializer for the currently constructed object. 更多... | |
友元 | |
| class | FScriptIntegrationObjectHelper |
| class | UObject |
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, | ||
| bool | bInCopyTransientsFromClassDefaults, | ||
| bool | bInShouldInitializeProps, | ||
| struct FObjectInstancingGraph * | InInstanceGraph = nullptr |
||
| ) |
Constructor
| InObj | object to initialize, from static allocate object, after construction |
| InObjectArchetype | object to initialize properties from |
| bInCopyTransientsFromClassDefaults | - if true, copy transient from the class defaults instead of the pass in archetype ptr (often these are the same) |
| bInShouldInitializeProps | false is a special case for changing base classes in UCCMake |
| InInstanceGraph | passed instance graph |
| UObject * FObjectInitializer::CreateDefaultSubobject | ( | UObject * | Outer, |
| FName | SubobjectFName, | ||
| UClass * | ReturnType, | ||
| UClass * | ClassToCreateByDefault, | ||
| bool | bIsRequired, | ||
| bool | bIsTransient | ||
| ) | const |
Create a component or subobject
| TReturnType | class of return type, all overrides must be of this type |
| TClassToConstructByDefault | if the derived class has not overridden, create a component of this type (default is TReturnType) |
| Outer | outer to construct the subobject in |
| SubobjectName | name of the new component |
| 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
| 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 |
| bTransient | true if the component is being assigned to a transient property |
|
inline |
Create a component or subobject
| 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 |
| 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 |
| bTransient | true if the component is being assigned to a transient property |
| UObject * FObjectInitializer::CreateEditorOnlyDefaultSubobject | ( | UObject * | Outer, |
| FName | SubobjectName, | ||
| UClass * | ReturnType, | ||
| bool | bTransient = false |
||
| ) | const |
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 |
| ReturnType | type of the new component |
| SubobjectName | name of the new component |
| bTransient | true if the component is being assigned to a transient property |
|
inline |
Create optional component or subobject.
Optional subobjects may not get created when a derived class specified DoNotCreateDefaultSubobject with the subobject's 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 |
| 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 |
|
static |
Gets ObjectInitializer for the currently constructed object.
Can only be used inside of a constructor of UObject-derived class.
|
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. |