UUserDefinedStruct

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/Engine/UserDefinedStruct.h

Include

#include "Engine/UserDefinedStruct.h"

Syntax

class UUserDefinedStruct : public UScriptStruct

Variables

Name Description

Protected variable

bool

 

bIgnoreStructDefaults

Bool to indicate we want to initialize a version of this struct without defaults, this is set while allocating the DefaultStructInstance itself

Protected variable

FUserStructOnSc...

 

DefaultStructInstance

Default instance of this struct with default values filled in, used to initialize structure

Public variable

UObject *

 

EditorData

Public variable

FString

 

ErrorMessage

Public variable

FGuid

 

Guid

Uniquely identifies this specific user struct

Public variable

TWeakObjectPtr<...

 

PrimaryStruct

The original struct, when current struct isn't a temporary duplicate, the field should be null

Public variable

TEnumAsByte< en...

 

Status

Status of this struct, outside of the editor it is assumed to always be UpToDate

Public variable

friend

 

UUserDefinedStructEditorData

Constructors

Name Description

Public function

UUserDefinedStruct

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Public function Static

void

 

AddReferencedObjects

(
    UObject* InThis,
    FReferenceCollector& Collector
)

Returns references from default instance

Public function Const

const uint8 ...

 

GetDefaultInstance()

Returns the raw memory of the default instance

Public function Static

uint32

 

GetUserDefinedStructTypeHash

(
    const void* Src,
    const UScriptStruct* Type
)

Computes hash

Public function Const

void

 

InitializeStructIgnoreDefaults

(
    void* Dest,
    int32 ArrayDim
)

Specifically initialize this struct without using the default instance data

Public function

void

 

UpdateStructFlags()

Inspects properties and default values, setting appropriate StructFlags

Public function

void

 

ValidateGuid()

Creates a new guid if needed

Overridden from UScriptStruct

Name Description

Public function Virtual Const

FGuid

 

GetCustomGuid()

Returns the custom Guid assigned to this struct for User Defined Structs, or an invalid Guid

Public function Virtual Const

FString

 

GetStructCPPName()

Returns the (native, c++) name of the struct

Public function Virtual Const

uint32

 

GetStructTypeHash

(
    const void* Src
)

Calls GetTypeHash for native structs, otherwise computes a hash of all struct members

Public function Virtual

void

 

RecursivelyPreload()

Used by User Defined Structs to preload this struct and any child objects

Overridden from UStruct

Name Description

Public function Virtual Const

UProperty &#...

 

CustomFindProperty

(
    const FName InName
)

Look up a property by an alternate name if it was not found in the first search, this is overridden for user structs

Public function Virtual Const

FString

 

GetAuthoredNameForField

(
    const UField* Field
)

Returns a human readable string for a given field, overridden for user defined structs

Public function Virtual Const

void

 

InitializeStruct

(
    void* Dest,
    int32 ArrayDim
)

Initialize a struct over uninitialized memory.

Public function Virtual Const

void

 

SerializeTaggedProperties

(
    FStructuredArchive::FSlot Slot,
    uint8* Data,
    UStruct* DefaultsStruct,
    uint8* Defaults,
    const UObject* BreakRecursionI...
)

Serializes list of properties, using property tags to handle mismatches

Overridden from UObject

Name Description

Public function Virtual Const

void

 

GetAssetRegistryTags

(
    TArray< FAssetRegistryTag >& OutTa...
)

Gathers a list of asset registry searchable tags which are name/value pairs with some type information This only needs to be implemented for asset objects

Public function Virtual

void

 

PostDuplicate

(
    bool bDuplicateForPIE
)

Called after duplication & serialization and before PostLoad.

Public function Virtual

void

 

PostLoad()

Do any object-specific cleanup required immediately after loading an object.

Public function Virtual

void

 

Serialize

(
    FStructuredArchive::FRecord Record
)

Handles reading, writing, and reference collecting using FArchive.

Select Skin
Light
Dark

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback