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.

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

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