UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FObjectDuplicationParameters Struct Reference

#include <UObjectGlobals.h>

Public Member Functions

COREUOBJECT_API FObjectDuplicationParameters (UObject *InSourceObject, UObject *InDestOuter)
 

Public Attributes

UObjectSourceObject
 
UObjectDestOuter
 
FName DestName
 
EObjectFlags FlagMask
 
EInternalObjectFlags InternalFlagMask
 
EObjectFlags ApplyFlags
 
EInternalObjectFlags ApplyInternalFlags
 
uint32 PortFlags
 
EDuplicateMode::Type DuplicateMode
 
bool bAssignExternalPackages = true
 
bool bSkipPostLoad = false
 
UClassDestClass
 
TMap< UObject *, UObject * > DuplicationSeed
 
TMap< UObject *, UObject * > * CreatedObjects
 

Detailed Description

This struct is used for passing parameter values to the StaticDuplicateObject() method. Only the constructor parameters are required to be valid - all other members are optional.

Constructor & Destructor Documentation

◆ FObjectDuplicationParameters()

FObjectDuplicationParameters::FObjectDuplicationParameters ( UObject InSourceObject,
UObject InDestOuter 
)

Constructor

Constructor - zero initializes all members

Member Data Documentation

◆ ApplyFlags

EObjectFlags FObjectDuplicationParameters::ApplyFlags

A bitmask of EObjectFlags to set on each duplicate object created. Different from FlagMask in that only the bits from FlagMask which are also set on the source object will be set on the duplicate, while the flags in this value will always be set.

◆ ApplyInternalFlags

EInternalObjectFlags FObjectDuplicationParameters::ApplyInternalFlags

A bitmask of EInternalObjectFlags to set on each duplicate object created. Different from FlagMask in that only the bits from FlagMask which are also set on the source object will be set on the duplicate, while the flags in this value will always be set.

◆ bAssignExternalPackages

bool FObjectDuplicationParameters::bAssignExternalPackages = true

if an object being duplicated as an assigned external package, the duplicated object will try to assign an associated package to itself. The associated package should come from the DuplicationSeed.

◆ bSkipPostLoad

bool FObjectDuplicationParameters::bSkipPostLoad = false

if this option is true, then PostLoad won't be called on the new duplicated objects. It will be the responsability of the caller in that case to eventually call post load on those objects. a CreatedObjects map should be provided.

◆ CreatedObjects

TMap<UObject*,UObject*>* FObjectDuplicationParameters::CreatedObjects

If non-null, this will be filled with the list of objects created during the call to StaticDuplicateObject.

Key will be the source object; value will be the duplicated object

◆ DestClass

UClass* FObjectDuplicationParameters::DestClass

Optional class to specify for the destination object.

Warning
: MUST BE SERIALIZATION COMPATIBLE WITH SOURCE OBJECT, AND DOES NOT WORK WELL FOR OBJECT WHICH HAVE COMPLEX COMPONENT HIERARCHIES!!!

◆ DestName

FName FObjectDuplicationParameters::DestName

The name to use for the duplicate of SourceObject

◆ DestOuter

UObject* FObjectDuplicationParameters::DestOuter

The object to use as the Outer for the duplicate of SourceObject.

◆ DuplicateMode

EDuplicateMode::Type FObjectDuplicationParameters::DuplicateMode

◆ DuplicationSeed

TMap<UObject*,UObject*> FObjectDuplicationParameters::DuplicationSeed

Objects to use for prefilling the dup-source => dup-target map used by StaticDuplicateObject. Can be used to allow individual duplication of several objects that share a common Outer in cases where you don't want to duplicate the shared Outer but need references between the objects to be replaced anyway.

Objects in this map will NOT be duplicated Key should be the source object; value should be the object which will be used as its duplicate.

◆ FlagMask

EObjectFlags FObjectDuplicationParameters::FlagMask

A bitmask of EObjectFlags to propagate to the duplicate of SourceObject (and its subobjects).

◆ InternalFlagMask

EInternalObjectFlags FObjectDuplicationParameters::InternalFlagMask

A bitmask of EInternalObjectFlags to propagate to the duplicate of SourceObject (and its subobjects).

◆ PortFlags

uint32 FObjectDuplicationParameters::PortFlags

Any PortFlags to be applied when serializing.

◆ SourceObject

UObject* FObjectDuplicationParameters::SourceObject

The object to be duplicated


The documentation for this struct was generated from the following files: