UPROPERTY

From UE4: Community Wiki
Jump to: navigation, search

Description[edit]

UProperty variables are declared using standard C++ syntax with additional descriptors, such as variable specifiers and metadata placed above the declaration.

 UPROPERTY([specifier, specifier, ...], [meta=(key=value, key=value, ...)])
 Type VariableName;

Aside from this comprehensive wiki article, the official documentation lists all valid property specifiers excluding the meta data specifiers below.

Missing specifiers on the official list: BindWidget[1], BindWidgetAnim[2] and BindWidgetAnimOptional[2].

Garbage Collection[edit]

In a nutshell, Garbage Collection (GC) traverses the object hierarchy through designated UPROPERTY's, starting from the root objects (hence AddToRoot and RemoveFromRoot methods). Any object that cannot be reached through this traversal will be garbage collected. Accordingly, non-UPROPERTY variables are not counted by the GC system.

In other words, if you have two UObjects which reference each other (aka. Cyclic Reference), but no other objects refer to them, both of these UObjects will be GCed.

Valid Specifiers[edit]

Pro Tip: You can use using namespace UP; to have these keywords as enums thus potentially have them auto-complete.
Works with VAssistX


Pro Tip: All valid UPROPERTY specifiers are listed as enum values in "ObjectBase.h", Line 728


Const[edit]

This property is const and should be exported as const.


As of at least 4.12.5, using this as a UPROPERTY specifier will cause a compilation error. Use one of the Visible* specifiers instead.


Config[edit]

Property should be loaded/saved to ini file as permanent profile.

GlobalConfig[edit]

Same as above but load config from base class, not subclass.

Localized[edit]

Property should be loaded as localizable text. Implies ReadOnly.

Transient[edit]

Property is transient: shouldn't be saved, zero-filled at load time. Opposite of the SaveGame specifier.

DuplicateTransient[edit]

Property should always be reset to the default value during any type of duplication (copy/paste, binary duplication, etc.)

NonPIETransient[edit]

Property should always be reset to the default value during any type of duplication (copy/paste, binary duplication, etc.)

Ref[edit]

Value is copied out after function call. Only valid on function param declaration.


This is a UPARAM specifier; not a UPROPERTY specifier.


Export[edit]

Object property can be exported with it's owner.

EditInline[edit]

Edit this object reference inline in the editor.

NoClear[edit]

Hide clear (and browse) button in the editor.

EditFixedSize[edit]

Indicates that elements of an array can be modified in Editor, but its size cannot be changed.


Static arrays of containers, such as TArray, are not allowed. Use dynamic arrays.


May not work properly with container arrays of Structs. Mine were not editable. 4.12.5


Replicated[edit]

Property is relevant to network replication.

ReplicatedUsing[edit]

Property will be configured for replication. The provided function is called only when the replicated property is received via replication.

Template:Example


More Information


RepRetry[edit]

Retry replication of this property if it fails to be fully sent (e.g. object references not yet available to serialize over the network)

NotReplicated[edit]

Skip replication (only for struct members and parameters in service request functions).

Interp[edit]

Interpolatable property for use with matinee. Always user-settable in the editor.

NonTransactional[edit]

Changes to this variable value will not be included in the editor's undo/redo history.

Instanced[edit]

Property is a component reference. Implies EditInline and Export.

BlueprintAssignable[edit]

MC Delegates only. Property should be exposed for assigning in blueprints.

Category[edit]

Specifies the category of the property within the Editor. Supports sub-categories separated by "|".

Template:Example

SimpleDisplay[edit]

Properties appear visible by default in a details panel

AdvancedDisplay[edit]

Moves the property into the Advanced dropdown in the Details panel within the Editor.


Does not appear to work within property subcategories as of 4.12.5


EditAnywhere[edit]

Indicates that this property can be edited via property windows, archetypes and instances within the Editor.

EditInstanceOnly[edit]

Indicates that this property can be edited by property windows, but only on instances, not on archetypes

EditDefaultsOnly[edit]

Indicates that this property can be edited by property windows, but only on archetypes. This operator is incompatible with the Visible* specifiers.

VisibleAnywhere[edit]

Indicates that this property is visible in property windows, but cannot be edited at all

VisibleInstanceOnly[edit]

Indicates that this property is only visible in property windows for instances, not for archetypes, and cannot be edited

VisibleDefaultsOnly[edit]

Indicates that this property is only visible in property windows for archetypes, and cannot be edited

BlueprintReadOnly[edit]

This property can be read by blueprints, but not modified.

BlueprintReadWrite[edit]

This property can be read or written from a blueprint.

AssetRegistrySearchable[edit]

The AssetRegistrySearchable keyword indicates that this property and it's value will be automatically added to the asset registry for any asset class instances containing this as a member variable. It is not legal to use on struct properties or parameters.

SaveGame[edit]

Property should be serialized for save game. Opposite of the Transient specifier.

BlueprintCallable[edit]

Multicast Delegates only. Property should be exposed for calling in blueprint code

BlueprintAuthorityOnly[edit]

MC Delegates only. This delegate accepts (only in blueprint) only events with BlueprintAuthorityOnly.

TextExportTransient[edit]

Property shouldn't be exported to text format (e.g. copy/paste)

Valid Meta Properties[edit]

DisplayName[edit]

Sets the display name for the property in the editor. The default value is the variable name with a space before each capital letter beyond the first. For example 'MyVariableName' would display as 'My Variable Name'.

Template:Example


Boolean variables with names that start with a lowercase "b" will be culled by default within the Editor


AllowAbstract[edit]

Used for FStringClassReference properties. Indicates whether abstract class types should be shown in the class picker.

AllowedClasses[edit]

Used for FStringAssetReference properties. Comma delimited list that indicates the class type(s) of assets to be displayed in the asset picker.

AllowPreserveRatio[edit]

Used for FVector properties. It causes a ratio lock to be added when displaying this property in details panels.

ArrayClamp[edit]

Used for integer properties. Clamps the valid values that can be entered in the UI to be between 0 and the length of the array specified.

ClampMin[edit]

Used for float and integer properties. Specifies the minimum value that may be entered for the property.

Template:Example


Does not work with containers, such as TArray<float>


ClampMax[edit]

Used for float and integer properties. Specifies the maximum value that may be entered for the property.

Template:Example


Does not work with containers, such as TArray<float>


DisplayThumbnail[edit]

Indicates that the property is an asset type and it should display the thumbnail of the selected asset.

EditCondition[edit]

Specifies a boolean property that is used to indicate whether editing of this property is allowed within the editor.

Template:Example

ExactClass[edit]

Used for FStringAssetReference properties in conjunction with AllowedClasses. Indicates whether only the exact classes specified in AllowedClasses can be used or whether subclasses are valid.

ExposeFunctionCategories[edit]

[Undocumented]

ExposeOnSpawn[edit]

Specifies whether the property should be exposed on a Spawn Actor for the class type.

Template:Example

FixedIncrement[edit]

[Undocumented]

ForceRebuildProperty[edit]

[Undocumented]

HideAlphaChannel[edit]

Used for FColor and FLinearColor properties. Indicates that the Alpha property should be hidden when displaying the property widget in the details.

IsBlueprintBaseOnly[edit]

Used for FStringClassReference properties. Indicates whether only blueprint classes should be shown in the class picker.

OnlyPlaceable[edit]

Used for Subclass properties. Indicates whether only placeable classes should be shown in the class picker.

MakeEditWidget[edit]

When used with certain objects such as an FVector, you get to use an "edit widget" within the editor to transform the object in space.

MakeStructureDefaultValue[edit]

For properties in a structure indicates the default value of the property in a blueprint make structure node.

MetaClass[edit]

Used FStringClassReference properties. Indicates the parent class that the class picker will use when filtering which classes to display.

Multiple[edit]

[Undocumented]

MultiLine[edit]

Used for FString and FText properties. Indicates that the edit field should be multi-line, allowing entry of newlines.

Usage: "meta=(MultiLine=true)"

NoElementDuplicate[edit]

Used for array properties. Indicates that the duplicate icon should not be shown for entries of this array in the property panel.

NoSpinbox[edit]

Used for integer and float properties. Indicates that the spin box element of the number editing widget should not be displayed.

FilePathFilter[edit]

Used by FFilePath properties. Indicates the path filter to display in the file picker.

RelativePath[edit]

Used by FDirectoryPath properties.

RelativeToGameContentDir[edit]

Used by FDirectoryPath properties.

ShowOnlyInnerProperties[edit]

Used for struct properties. The properties of the struct are shown directly in the details panel instead of having the need to expand them to show them.

SliderExponent[edit]

[Undocumented]

UIMin[edit]

Used for float and integer properties. Specifies the lowest that the value slider should represent.

UIMax[edit]

Used for float and integer properties. Specifies the highest that the value slider should represent.

Related[edit]

UCLASS, UFUNCTION, USTRUCT, UMETA, UPARAM, UENUM, UDELEGATE