Language:
Discover
By Skill Level
By Category

UStruct

Choose your OS:

Inheritance Hierarchy

Syntax

class UStruct : public UField

Remarks

UStruct .

Base class for all UObject types that contain fields.

Variables

Name Description

Public variable

UField *

 

Children

Pointer to start of linked list of child fields

Public variable

UProperty *

 

DestructorLink

In memory only: Linked list of properties requiring destruction.

Public variable

int32

 

MinAlignment

Alignment of structure in memory, structure will be at least this large

Public variable

UProperty *

 

PostConstructLink

In memory only: Linked list of properties requiring post constructor initialization

Public variable

int32

 

PropertiesSize

Total size of all UProperties, the allocated structure may be larger due to alignment

Public variable

UProperty *

 

PropertyLink

In memory only: Linked list of properties from most-derived to base

Public variable

UProperty *

 

RefLink

In memory only: Linked list of object reference properties from most-derived to base

Public variable

TArray < uint8 >

 

Script

Script bytecode associated with this object

Public variable

TArray < UObject ...

 

ScriptObjectReferences

Array of object references embedded in script code.

Constructors

Name Description

Public function

UStruct

(
    const FObjectInitializer & ObjectIn...
)

Public function

UStruct

(
    FVTableHelper & Helper
)

DO NOT USE. This constructor is for internal usage only for hot-reload purposes.

Public function

UStruct

(
    EStaticConstructor ,
    int32 InSize,
    EObjectFlags InFlags
)

Constructors.

Public function

UStruct

(
    UStruct * InSuperStruct,
    SIZE_T ParamsSize,
    SIZE_T Alignment
)

Public function

UStruct

(
    const FObjectInitializer & ObjectIn...,
    UStruct * InSuperStruct,
    SIZE_T ParamsSize,
    SIZE_T Alignment
)

Functions

Name Description

Public function Static

void

 

__DefaultConstructor

(
    const FObjectInitializer & X
)

Public function Static

UObject *...

 

__VTableCtorCaller

(
    FVTableHelper & Helper
)

Public function Static

void

 

AddReferencedObjects

(
    UObject * InThis,
    FReferenceCollector & Collector
)

Protected function Virtual

bool

 

ArePropertyGuidsAvailable()

Returns if we have access to property guids

Public function Virtual

UProperty &#...

 

CustomFindProperty

(
    const FName InName
)

Used to search for properties in user defined structs

Public function Virtual

void

 

DestroyStruct

(
    void* Dest,
    int32 ArrayDim
)

Destroy a struct in memory.

Public function

UProperty &#...

 

FindPropertyByName

(
    FName InName
)

Searches property link chain for a property with the specified name

Protected function Virtual

FGuid

 

FindPropertyGuidFromName

(
    const FName InName
)

Find property guid

Protected function Virtual

FName

 

FindPropertyNameFromGuid

(
    const FGuid & PropertyGuid
)

HACK_HEADER_GENERATOR.

Public function

bool

 

GetBoolMetaDataHierarchical

(
    const FName & Key
)

Try and find boolean metadata with the given key.

Public function Virtual

UStruct *...

 

GetInheritanceSuper()

Returns the structure used for inheritance, may be changed by child types

Public function

int32

 

GetMinAlignment()

Alignment of structure in memory, structure will be at least this large

Public function Virtual

const TCHAR ...

 

GetPrefixCPP()

Returns the struct/ class prefix used for the C++ declaration of this struct/ class.

Public function

int32

 

GetPropertiesSize()

Total size of all UProperties, the allocated structure may be larger due to alignment

Public function

bool

 

GetStringMetaDataHierarchical

(
    const FName & Key,
    FString * OutValue
)

Try and find string metadata with the given key.

Public function

int32

 

GetStructureSize()

Returns actual allocated size of structure in memory

Public function

UStruct *...

 

GetSuperStruct()

Struct this inherits from, may be null

Public function

const UStruc ...

 

HasMetaDataHierarchical

(
    const FName & Key
)

Determines if the struct or any of its super structs has any metadata associated with the provided key

Public function Virtual

void

 

InitializeStruct

(
    void* Dest,
    int32 ArrayDim
)

Initialize a struct over uninitialized memory.

Public function

void

 

InstanceSubobjectTemplates

(
    void* Data,
    void const* DefaultData,
    UStruct * DefaultStruct,
    UObject * Owner,
    FObjectInstancingGraph * Instan...
)

Creates new copies of components

Public function

bool

 

IsChildOf

(
    const UStruct * SomeBase
)

Returns true if this struct either is SomeBase, or is a child of SomeBase.

Public function

bool

 

IsChildOf()

Returns true if this struct either is class T, or is a child of class T.

Public function Virtual

void

 

Link

(
    FArchive & Ar,
    bool bRelinkExistingProperties
)

Creates the field/property links and gets structure ready for use at runtime

Public function Virtual

FString

 

PropertyNameToDisplayName

(
    FName InName
)

Returns the a human readable string for a property, overridden for user defined structs

Public function Virtual

void

 

SerializeBin

(
    FArchive & Ar,
    void* Data
)

Public function Virtual

void

 

SerializeBin

(
    FStructuredArchive::FSlot Slot,
    void* Data
)

Serializes struct properties, does not handle defaults

Public function

void

 

SerializeBinEx

(
    FStructuredArchive::FSlot Slot,
    void* Data,
    void const* DefaultData,
    UStruct * DefaultStruct
)

Serializes the class properties that reside in Data if they differ from the corresponding values in DefaultData

Public function Virtual

EExprToken

 

SerializeExpr

(
    int32 & iCode,
    FArchive & Ar
)

WITH_EDITOR.

Public function Virtual

void

 

SerializeSuperStruct

(
    FArchive & Ar
)

Serializes the SuperStruct pointer

Public function Virtual

void

 

SerializeTaggedProperties

(
    FArchive & Ar,
    uint8 * Data,
    UStruct * DefaultsStruct,
    uint8 * Defaults,
    const UObject * BreakRecursionI...
)

Serializes list of properties, using property tags to handle mismatches

Public function Virtual

void

 

SerializeTaggedProperties

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

Public function

void

 

SetPropertiesSize

(
    int32 NewSize
)

Modifies the property size after it's been recomputed

Public function Virtual

void

 

SetSuperStruct

(
    UStruct * NewSuperStruct
)

Sets the super struct pointer and updates hash information as necessary.

Public function Static

UClass *

 

StaticClass()

Returns a UClass object representing this class at runtime

Public function Static

EClassCastFl ...

 

StaticClassCastFlags()

Returns the static cast flags for this class

Public function

void

 

StaticLink

(
    bool bRelinkExistingProperties
)

Static wrapper for Link, using a dummy archive

Public function Static

const TCHAR ...

 

StaticPackage()

Returns the package this class belongs in

Public function Static

void

 

StaticRegisterNativesUStruct()

Overridden from UField

Name Description

Public function Virtual

void

 

AddCppProperty

(
    UProperty * Property
)

UField interface.

Overridden from UObject

Name Description

Public function Virtual

void

 

FinishDestroy()

Called to finish destroying the object.

Public function Virtual

void

 

GetPreloadDependencies

(
    TArray < UObject * >& OutDeps
)

Called during cooking.

Public function Virtual

void

 

Serialize

(
    FStructuredArchive::FRecord Record
)

Public function Virtual

void

 

Serialize

(
    FArchive & Ar
)

UObject interface.

Public function Virtual

void

 

TagSubobjects

(
    EObjectFlags NewFlags
)

Tags objects that are part of the same asset with the specified object flag, used for GC checking

Overridden from UObjectBase

Name Description

Public function Virtual

void

 

RegisterDependencies()

Force any base classes to be registered first, then call BaseRegister

Operators

Name Description

Public function

void *

 

operator new

(
    const size_t InSize,
    EInternal InInternalOnly,
    UObject * InOuter,
    FName InName,
    EObjectFlags InSetFlags
)

For internal use only; use StaticConstructObject() to create new objects.

Public function

void *

 

operator new

(
    const size_t InSize,
    EInternal * InMem
)

For internal use only; use StaticConstructObject() to create new objects.

Typedefs

Name

Description

Super

Typedef for the base class (UField )

ThisClass

Typedef for UStruct .

Constants

Name

Description

StaticClassFlags

Bitwise union of EClassFlags pertaining to this class.

References

Module

CoreUObject

Header

Runtime/CoreUObject/Public/UObject/Class.h