UFUNCTION

Description

Valid Keywords

These Keywords are also valid for UDELEGATE.

BlueprintImplementableEvent

This function is designed to be overridden by a blueprint. Do not provide a body for this function; the autogenerated code will include a thunk that calls ProcessEvent to execute the overridden body.

BlueprintNativeEvent

This function is designed to be overridden by a blueprint, but also has a native implementation. Provide a body named [FunctionName]_Implementation instead of [FunctionName]; the autogenerated code will include a thunk that calls the implementation method when necessary.

SealedEvent

This function is sealed and cannot be overridden in subclasses. It is only a valid keyword for events; declare other methods as static or FINAL to indicate that they are sealed.

Exec

This function is executable from the Console CLI.

Server

This function is replicated, and executed on servers. Provide a body named [FunctionName]_Implementation instead of [FunctionName]. The auto-generated code will include a thunk that calls the implementation method when necessary.

Client

This function is replicated, and executed on clients. Provide a body named [FunctionName]_Implementation instead of [FunctionName]. The auto-generated code will include a thunk that calls the implementation method when necessary.

NetMulticast

This function is both executed locally on the server and replicated to all clients, regardless of the Actor's NetOwner

Reliable

Replication of calls to this function should be done on a reliable channel. Only valid when used in conjunction with Client or Server

Unreliable

Replication of calls to this function can be done on an unreliable channel. Only valid when used in conjunction with Client or Server

BlueprintPure

This function fulfills a contract of producing no side effects, and additionally implies BlueprintCallable. Useful and clean way to implement "Get" functions.

Additionally can be marked as false on const functions to make them non-pure.

BlueprintCallable

This function can be called from Blueprints or C++ and will be exposed to the user of Blueprint editing tools.

BlueprintAuthorityOnly

This function will not execute from Blueprint code if running on something without network authority.

BlueprintCosmetic

This function is cosmetic-only and will not run on dedicated servers.

CustomThunk

The UnrealHeaderTool code generator will not produce a execFoo thunk for this function. It is up to the user to provide one.

Category

Specifies the category of the function when displayed in Blueprint editing tools.

Example Category=CategoryName

Category="Category,SubCategory"

Category="Category|SubCategory"

WithValidation

This function must supply a _Validate implementation

ServiceRequest

This function is RPC service request

ServiceResponse

This function is RPC service response

Valid Meta Properties

ToolTip

Overrides the automatically generated tooltip from the class comment

ShortTooltip

A short tooltip that is used in some contexts where the full tooltip might be overwhelming (such as the parent class picker dialog)

AdvancedDisplay

Used with a comma-separated list of parameter names that should show up as advanced pins (requiring UI expansion). Alternatively you can set a number, which is the number of paramaters from the start that should *not* be marked as advanced (eg 'AdvancedDisplay="2"' will mark all but the first two advanced).

ArrayParm

Indicates that a BlueprintCallable function should use a Call Array Function node and that the parameters specified in the comma delimited list should be treated as wild card array properties.

ArrayTypeDependentParams

Used when ArrayParm has been specified to indicate other function parameters that should be treated as wild card properties linked to the type of the array parameter.

AutoCreateRefTerm

Not documented

BlueprintInternalUseOnly

This function is an internal implementation detail, used to implement another function or node. It is never directly exposed in a graph.

BlueprintProtected

This function can only be called on 'this' in a blueprint. It cannot be called on another instance.

CallableWithoutWorldContext

Used for BlueprintCallable functions that have a WorldContext pin to indicate that the function can be called even if the class does not implement the virtual function GetWorld().

CommutativeAssociativeBinaryOperator

Indicates that a BlueprintCallable function should use the Commutative Associative Binary node.

CompactNodeTitle

Indicates that a BlueprintCallable function should display in the compact display mode and the name to use in that mode.

CustomStructureParam

Not documented

DefaultToSelf

For BlueprintCallable functions indicates that the object property named's default value should be the self context of the node

DeprecatedFunction

This function is deprecated, any blueprint references to it cause a compilation warning.

DeprecationMessage

Used in conjunction with DeprecatedNode or DeprecatedFunction to customize the warning message displayed to the user.

ExpandEnumAsExecs

For BlueprintCallable functions indicates that an input exec pin should be created for each entry in the enum specified.

DisplayName

The name to display for this class, property, or function instead of auto-generating it from the name.

HidePin

For BlueprintCallable functions indicates that the parameter pin should be hidden from the user's view.

HideSpawnParms

Not documented

Keywords

For BlueprintCallable functions provides additional keywords to be associated with the function for search purposes.

Latent

Indicates that a BlueprintCallable function is Latent

LatentInfo

For Latent BlueprintCallable functions indicates which parameter is the LatentInfo parameter

MaterialParameterCollectionFunction

For BlueprintCallable functions indicates that the material override node should be used

NativeBreakFunc

For BlueprintCallable functions indicates that the function should be displayed the same as the implicit Break Struct nodes

NativeMakeFunc

For BlueprintCallable functions indicates that the function should be displayed the same as the implicit Make Struct nodes

UnsafeDuringActorConstruction

Used by BlueprintCallable functions to indicate that this function is not to be allowed in the Construction Script.

WorldContext

Used by BlueprintCallable functions to indicate which parameter is used to determine the World that the operation is occurring within.

BlueprintAutocast

Used only by static BlueprintPure functions from BlueprintLibrary. A cast node will be automatically added for the return type and the type of the first parameter of the function.

NotBlueprintThreadSafe

Only valid in Blueprint Function Libraries. Mark this function as an exception to the class's general BlueprintThreadSafe metadata.

DefaultToSelf

Sets the default value of the Blueprint input pin to 'self.'

Note The pin set to DefaultToSelf doesn't appear to actually say "self," like Target does, making it difficult to know the pin has this property set

Example UFUNCTION(BlueprintCallable, meta=(DefaultToSelf="Controller")
void AddToList(AIController* Controller);

Related

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