Module |
|
Header |
/Engine/Source/Runtime/CoreUObject/Public/UObject/UObjectGlobals.h |
Include |
#include "UObject/UObjectGlobals.h" |
Source |
/Engine/Source/Runtime/CoreUObject/Private/UObject/UObjectGlobals.cpp |
UObject * StaticConstructObject_Internal
(
const UClass * Class,
UObject * InOuter,
FName Name,
EObjectFlags SetFlags,
EInternalObjectFlags InternalSetFlags,
UObject * Template,
bool bCopyTransientsFromClassDefaults,
struct FObjectInstancingGraph * InstanceGraph,
bool bAssumeTemplateIsArchetype
)
Create a new instance of an object. The returned object will be fully initialized. If InFlags contains RF_NeedsLoad (indicating that the object still needs to load its object data from disk), components are not instanced (this will instead occur in PostLoad()). The different between StaticConstructObject and StaticAllocateObject is that StaticConstructObject will also call the class constructor on the object and instance any components.
A pointer to a fully initialized object of the specified class.
Parameter |
Description |
---|---|
Class |
The class of the object to create |
InOuter |
The object to create this object within (the Outer property for the new object will be set to the value specified here). |
Name |
The name to give the new object. If no value (NAME_None) is specified, the object will be given a unique name in the form of ClassName_#. |
SetFlags |
The ObjectFlags to assign to the new object. some flags can affect the behavior of constructing the object. |
InternalSetFlags |
The InternalObjectFlags to assign to the new object. some flags can affect the behavior of constructing the object. |
Template |
If specified, the property values from this object will be copied to the new object, and the new object's ObjectArchetype value will be set to this object. If nullptr, the class default object is used instead. |
bInCopyTransientsFromClassDefaults |
If true, copy transient from the class defaults instead of the pass in archetype ptr (often these are the same) |
InstanceGraph |
Contains the mappings of instanced objects and components to their templates |
bAssumeTemplateIsArchetype |
If true, Template is guaranteed to be an archetype |