UProperty

An UnrealScript variable.

Windows
MacOS
Linux

Inheritance Hierarchy

Syntax

class UProperty : public UField

Remarks

An UnrealScript variable.

Variables

Name Description

Public variable

int32

 

ArrayDim

Persistent variables.

Public variable

UProperty *

 

DestructorLinkNext

In memory only: Linked list of properties requiring destruction.

Public variable

int32

 

ElementSize

Public variable

UProperty *

 

NextRef

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

Public variable

UProperty *

 

PostConstructLinkNext

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

Public variable

EPropertyFlags

 

PropertyFlags

Public variable

UProperty *

 

PropertyLinkNext

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

Public variable

uint16

 

RepIndex

Public variable

FName

 

RepNotifyFunc

Constructors

Name Description

Public function

UProperty

(
    FVTableHelper& Helper
)

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

Public function

UProperty

(
    const FObjectInitializer& ObjectIn...
)

Constructors.

Public function

UProperty

(
    ECppProperty,
    int32 InOffset,
    EPropertyFlags InFlags
)

Public function

UProperty

(
    const FObjectInitializer& ObjectIn...,
    ECppProperty,
    int32 InOffset,
    EPropertyFlags InFlags
)

Functions

Name Description

Public function Static

void

 

__DefaultConstructor

(
    const FObjectInitializer& X
)

Public function Static

UObject *...

 

__VTableCtorCaller

(
    FVTableHelper& Helper
)

Public function

void

 

ClearPropertyFlags

(
    EPropertyFlags NewFlags
)

Public function Const

void

 

ClearValue

(
    void* Data
)

Zeros the value for this property.

Public function Const

void

 

ClearValue_InContainer

(
    void* Data,
    int32 ArrayIndex
)

Zeros the value for this property.

Protected function Virtual Const

void

 

ClearValueInternal

(
    void* Data
)

Public function Const

ValueType co...

 

ContainerPtrToValuePtr

(
    UObject const* ContainerPtr,
    int32 ArrayIndex
)

Public function Const

ValueType co...

 

ContainerPtrToValuePtr

(
    void const* ContainerPtr,
    int32 ArrayIndex
)

Public function Const

ValueType &#...

 

ContainerPtrToValuePtr

(
    void* ContainerPtr,
    int32 ArrayIndex
)

Public function Const

ValueType &#...

 

ContainerPtrToValuePtr

(
    UObject* ContainerPtr,
    int32 ArrayIndex
)

Get the pointer to property value in a supplied 'container'.

Public function Const

ValueType co...

 

ContainerPtrToValuePtrForDefaults

(
    UStruct* ContainerClass,
    void const* ContainerPtr,
    int32 ArrayIndex
)

Public function Const

ValueType &#...

 

ContainerPtrToValuePtrForDefaults

(
    UStruct* ContainerClass,
    void* ContainerPtr,
    int32 ArrayIndex
)

Public function Const

ValueType &#...

 

ContainerPtrToValuePtrForDefaults

(
    UStruct* ContainerClass,
    UObject* ContainerPtr,
    int32 ArrayIndex
)

Default variants, these accept and return NULL, and also check the property against the size of the container.

Public function Const

ValueType co...

 

ContainerPtrToValuePtrForDefaults

(
    UStruct* ContainerClass,
    UObject const* ContainerPtr,
    int32 ArrayIndex
)

Public function Const

bool

 

ContainsInstancedObjectProperty()

Returns true if this property, or in the case of e.g. array or struct properties any sub- property, contains a UObject reference that is marked CPF_NeedCtorLink (i.e. instanced keyword).

Public function Virtual Const

bool

 

ContainsObjectReference

(
    TArray< const UStructProperty*...
)

Returns true if this property, or in the case of e.g. array or struct properties any sub- property, contains a UObject reference.

Public function Virtual Const

bool

 

ContainsWeakObjectReference()

Returns true if this property, or in the case of e.g. array or struct properties any sub- property, contains a weak UObject reference.

Public function Virtual

EConvertFrom...

 

ConvertFromType

(
    const FPropertyTag& Tag,
    FStructuredArchive::FSlot Slot,
    uint8* Data,
    UStruct* DefaultsStruct
)

Allows a property to implement backwards compatibility handling for tagged properties

Public function Const

void

 

CopyCompleteValue

(
    void* Dest,
    void const* Src
)

Copy the value for all elements of this property.

Public function Const

void

 

CopyCompleteValue_InContainer

(
    void* Dest,
    void const* Src
)

Public function Virtual Const

void

 

CopyCompleteValueFromScriptVM

(
    void* Dest,
    void const* Src
)

Copy the value for all elements of this property. From the script VM.

Public function Virtual Const

void

 

CopyCompleteValueToScriptVM

(
    void* Dest,
    void const* Src
)

Copy the value for all elements of this property. To the script VM.

Public function Const

void

 

CopySingleValue

(
    void* Dest,
    void const* Src
)

Copy the value for a single element of this property.

Public function Virtual Const

void

 

CopySingleValueFromScriptVM

(
    void* Dest,
    void const* Src
)

Copy the value for a single element of this property. From the script VM.

Public function Virtual Const

void

 

CopySingleValueToScriptVM

(
    void* Dest,
    void const* Src
)

Copy the value for a single element of this property. To the script VM.

Protected function Virtual Const

void

 

CopyValuesInternal

(
    void* Dest,
    void const* Src,
    int32 Count
)

Public function Const

void

 

DestroyValue

(
    void* Dest
)

Destroys the value for this property.

Public function Const

void

 

DestroyValue_InContainer

(
    void* Dest
)

Destroys the value for this property.

Protected function Virtual Const

void

 

DestroyValueInternal

(
    void* Dest
)

Public function Virtual

void

 

EmitReferenceInfo

(
    UClass& OwnerClass,
    int32 BaseOffset,
    TArray< const UStructProperty*...
)

Emits tokens used by realtime garbage collection code to passed in ReferenceTokenStream.

Public function Const

void

 

ExportCppDeclaration

(
    FOutputDevice& Out,
    EExportedDeclaration::Type Declarat...,
    const TCHAR* ArrayDimOverride,
    uint32 AdditionalExportCPPFlags,
    bool bSkipParameterName,
    const FString* ActualCppType,
    const FString* ActualExtendedT...,
    const FString* ActualParameter...
)

Public function Const

bool

 

ExportText_Direct

(
    FString& ValueStr,
    const void* Data,
    const void* Delta,
    UObject* Parent,
    int32 PortFlags,
    UObject* ExportRootScope
)

Public function Const

bool

 

ExportText_InContainer

(
    int32 Index,
    FString& ValueStr,
    const void* Data,
    const void* Delta,
    UObject* Parent,
    int32 PortFlags,
    UObject* ExportRootScope
)

Public function Virtual Const

void

 

ExportTextItem

(
    FString& ValueStr,
    const void* PropertyValue,
    const void* DefaultValue,
    UObject* Parent,
    int32 PortFlags,
    UObject* ExportRootScope
)

Public function Static

FName

 

FindRedirectedPropertyName

(
    UStruct* ObjectStruct,
    FName OldName
)

Gets a redirected property name, will return NAME_None if no redirection was found

Public function Const

ELifetimeCon...

 

GetBlueprintReplicationCondition()

Public function Virtual Const

FString

 

GetCPPMacroType

(
    FString& ExtendedTypeText
)

Public function Virtual Const

FString

 

GetCPPType

(
    FString* ExtendedTypeText,
    uint32 CPPExportFlags
)

Returns the text to use for exporting this property to header file.

Public function Virtual Const

FString

 

GetCPPTypeForwardDeclaration()

Public function Virtual Const

FName

 

GetID()

Public function Virtual Const

int32

 

GetMinAlignment()

Public function Const

FString

 

GetNameCPP()

Returns the C++ name of the property, including the _DEPRECATED suffix if the property is deprecated.

Public function Const

int32

 

GetOffset_ForDebug()

Return offset of property from container base.

Public function Const

int32

 

GetOffset_ForGC()

Return offset of property from container base.

Public function Const

int32

 

GetOffset_ForInternal()

Return offset of property from container base.

Public function Const

int32

 

GetOffset_ForUFunction()

Return offset of property from container base.

Public function Const

int32

 

GetOffset_ReplaceWith_ContainerPtrToValuePtr()

Return offset of property from container base.

Public function Const

UField *

 

GetOuterUField()

Public function Const

const UPrope...

 

GetOwnerProperty()

Public function

UProperty &#...

 

GetOwnerProperty()

Returns the first UProperty in this property's Outer chain that does not have a UProperty for an Outer

Public function Const

EPropertyFla...

 

GetPropertyFlags()

Returns this property's propertyflags

Public function

UProperty &#...

 

GetRepOwner()

Returns the replication owner, which is the property itself, or NULL if this isn't important for replication.

Public function Const

int32

 

GetSize()

Public function Const

uint32

 

GetValueTypeHash

(
    const void* Src
)

Returns the hash value for an element of this property.

Protected function Virtual Const

uint32

 

GetValueTypeHashInternal

(
    const void* Src
)

Public function Const

bool

 

HasAllPropertyFlags

(
    uint64 FlagsToCheck
)

Used to safely check whether all of the passed in flags are set.

Public function Const

bool

 

HasAnyPropertyFlags

(
    uint64 FlagsToCheck
)

Used to safely check whether any of the passed in flags are set.

Public function Virtual Const

bool

 

Identical

(
    const void* A,
    const void* B,
    uint32 PortFlags
)

Determines whether the property values are identical.

Public function Const

bool

 

Identical_InContainer

(
    const void* A,
    const void* B,
    int32 ArrayIndex,
    uint32 PortFlags
)

Determines whether the property values are identical.

Public function Static

const TCHAR ...

 

ImportSingleProperty

(
    const TCHAR* Str,
    void* DestData,
    UStruct* ObjectStruct,
    UObject* SubobjectOuter,
    int32 PortFlags,
    FOutputDevice* Warn,
    TArray< struct FDefinedProperty >&...
)

Parses and imports a text definition of a single property's value (if array, may be an individual element) also includes parsing of special operations for array properties (Add/Remove/RemoveIndex/Empty)

Public function Const

const TCHAR ...

 

ImportText

(
    const TCHAR* Buffer,
    void* Data,
    int32 PortFlags,
    UObject* OwnerObject,
    FOutputDevice* ErrorText
)

Protected function Virtual Const

const TCHAR ...

 

ImportText_Internal

(
    const TCHAR* Buffer,
    void* Data,
    int32 PortFlags,
    UObject* OwnerObject,
    FOutputDevice* ErrorText
)

Protected function

void

 

Init()

Initializes internal state.

Public function Const

void

 

InitializeValue

(
    void* Dest
)

Zeros, copies from the default, or calls the constructor for on the value for this property.

Public function Const

void

 

InitializeValue_InContainer

(
    void* Dest
)

Zeros, copies from the default, or calls the constructor for on the value for this property.

Protected function Virtual Const

void

 

InitializeValueInternal

(
    void* Dest
)

Public function Virtual

void

 

InstanceSubobjects

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

Creates new copies of components

Public function Const

bool

 

IsEditorOnlyProperty()

Editor-only properties are those that only are used with the editor is present or cannot be removed from serialisation.

Public function Const

bool

 

IsInContainer

(
    UStruct* ContainerClass
)

See if the offset of this property is below the supplied container size

Public function Const

bool

 

IsInContainer

(
    int32 ContainerSize
)

See if the offset of this property is below the supplied container size

Public function

int32

 

Link

(
    FArchive& Ar
)

Protected function Virtual

void

 

LinkInternal

(
    FArchive& Ar
)

Public function

void

 

LinkWithoutChangingOffset

(
    FArchive& Ar
)

Public function Virtual Const

bool

 

NetSerializeItem

(
    FArchive& Ar,
    UPackageMap* Map,
    void* Data,
    TArray< uint8 >* MetaData
)

Public function Virtual Const

bool

 

PassCPPArgsByRef()

Public function Virtual Const

bool

 

SameType

(
    const UProperty* Other
)

Returns true, if Other is property of exactly the same type

Public function

void

 

SerializeBinProperty

(
    FStructuredArchive::FSlot Slot,
    void* Data,
    int32 ArrayIdx
)

Serializes the property with the struct's data residing in Data.

Public function Virtual Const

void

 

SerializeItem

(
    FStructuredArchive::FSlot Slot,
    void* Value,
    void const* Defaults
)

Public function

void

 

SerializeNonMatchingBinProperty

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

Serializes the property with the struct's data residing in Data, unless it matches the default

Public function

void

 

SetBlueprintReplicationCondition

(
    ELifetimeCondition InBlueprintRepli...
)

Protected function

void

 

SetOffset_Internal

(
    int32 NewOffset
)

Set the alignment offset for this property - added for UMapProperty

Public function

void

 

SetPropertyFlags

(
    EPropertyFlags NewFlags
)

Public function Const

bool

 

ShouldDuplicateValue()

Determines whether this property value is eligible for copying when duplicating an object

Public function Const

bool

 

ShouldPort

(
    uint32 PortFlags
)

Public function Const

bool

 

ShouldSerializeValue

(
    FArchive& Ar
)

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 Static

const TCHAR ...

 

StaticPackage()

Returns the package this class belongs in

Public function Static

void

 

StaticRegisterNativesUProperty()

Public function Virtual Const

bool

 

SupportsNetSharedSerialization()

Public function Const

bool

 

ValidateImportFlags

(
    uint32 PortFlags,
    FOutputDevice* ErrorText
)

Verify that modifying this property's value via ImportText is allowed.

Overridden from UObject

Name Description

Public function Virtual Const

bool

 

IsPostLoadThreadSafe()

Called during async load to determine if PostLoad can be called on the loading thread.

Public function Virtual

void

 

Serialize

(
    FArchive& Ar
)

Handles reading, writing, and reference collecting using FArchive.

Operators

Name Description

Public function

void *

 

operator new

(
    const size_t InSize,
    EInternal* InMem
)

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

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.

Typedefs

Name

Description

Super

Typedef for the base class (UField)

ThisClass

Typedef for UProperty.

WithinClass

The required type of this object's outer (class UField)

Constants

Name

Description

StaticClassFlags

Bitwise union of EClassFlags pertaining to this class.

References

Module

CoreUObject

Header

Runtime/CoreUObject/Public/UObject/UnrealType.h

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