UUserDefinedEnum

User defined enumerations:

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/Engine/UserDefinedEnum.h

Include

#include "Engine/UserDefinedEnum.h"

Syntax

class UUserDefinedEnum : public UEnum

Remarks

User defined enumerations:

  • EnumType is always UEnum::ECppForm::Namespaced (to comfortable handle names collisions)

  • always have the last '_MAX' enumerator, that cannot be changed by user

  • Full enumerator name has form: '<enumeration path>="">::<short, user defined enumerator name>' An Enumeration is a list of named values.

Variables

Name Description

Public variable

TMap< FName, FT...

 

DisplayNameMap

De-facto display names for enum entries mapped against their raw enum name (UEnum::GetNameByIndex).

Public variable

FText

 

EnumDescription

Shows up in the content browser when the enum asset is hovered

Public variable

uint32

 

UniqueNameIndex

Constructors

Name Description

Public function

UUserDefinedEnum

(
    const FObjectInitializer& ObjectIn...
)

Functions

Overridden from UEnum

Name Description

Public function Virtual Const

FString

 

GenerateFullEnumName

(
    const TCHAR* InEnumName
)

Generates full enum name give enum name.

Public function Virtual Const

FString

 

GetAuthoredNameStringByIndex

(
    int32 InIndex
)

Returns the unlocalized logical name originally assigned to the enum at creation.

Public function Virtual Const

FText

 

GetDisplayNameTextByIndex

(
    int32 InIndex
)

Overridden to read DisplayNameMap

Public function Virtual Const

int64

 

ResolveEnumerator

(
    FArchive& Ar,
    int64 EnumeratorValue
)

Try to update value in enum variable after an enum's change.

Public function Virtual

bool

 

SetEnums

(
    TArray< TPair< FName, int64 >>& In...,
    ECppForm InCppForm,
    EEnumFlags InFlags,
    bool bAddMaxKeyIfMissing
)

Sets the array of enums.

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

 

PostEditChangeProperty

(
    FPropertyChangedEvent& PropertyCha...
)

Called when a property on this object has been modified externally

Public function Virtual

void

 

PostEditUndo()

Called after applying a transaction to the object.

Public function Virtual

void

 

PostLoad()

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

Public function Virtual

bool

 

Rename

(
    const TCHAR* NewName,
    UObject* NewOuter,
    ERenameFlags Flags
)

Rename this object to a unique name, or change its outer.

Public function Virtual

void

 

Serialize

(
    FArchive& Ar
)

Handles reading, writing, and reference collecting using FArchive.