Note: This page is still a work in progress. There are a lot of meta specifiers still to document!
Unreal's UFUNCTION Specifiers page lists all of the core specifiers and many of the metadata specifiers, but it is not an exhaustive list.
This page attempts to be an exhaustive list of all the UFUNCTION
specifiers, giving explanations, sample code, screenshots and related links for each.
If you know of any not listed here, or see any mistakes, feel free to contact me.
Special thanks to Erekose Craft, Ben Fox, Aquanox, ATankNoMore for finding meta properties, giving feedback and giving great examples of usage.
The YAML files used to generate this documentation are available on GitHub. Feel free to submit pull requests or submit any incorrect or missing information there.
General Points
- Tags are case insensitive, but I would recommend sticking to the case example here for readability.
- Quotation marks are optional if the values does not have spaces. e.g.
someBool=true
is treated the same assomeBool="true"
. Again, for readability I would recommend using quotation marks only around string-type properties.
Blueprint Logic
Blueprint Callable
Position:
Main
Type:
flag
UFUNCTION(BlueprintCallable)
Blueprint Implementable Event
Position:
Main
Type:
flag
UFUNCTION(BlueprintImplementableEvent)
Blueprint Native Event
Position:
Main
Type:
flag
UFUNCTION(BlueprintNativeEvent)
Force As Function
UFUNCTION(meta=(ForceAsFunction))
Allows users to change a BlueprintImplementableEvent with no return value from an event into a function.
Blueprint Pure
Position:
Main
Type:
flag (Technically a flag but can be used with false to disable)
UFUNCTION(BlueprintPure)
A BlueprintPure
function is shown as a node with no execution pin. By default functions marked const
will be exposed as pure functions. To make a const function not a pure function, use BlueprintPure=false
.
Pure functions do not cache their results, so be careful when doing any non-trivial amount of work a blueprint pure function. It is good practice to avoid outputting array properties in blueprint pure functions.
UFUNCTION(BlueprintPure)
int32 BlueprintPureFunction();
UFUNCTION(BlueprintCallable)
int32 BlueprintCallableFunction();
UFUNCTION(BlueprintCallable)
int32 BlueprintCallableConstFunction() const;
UFUNCTION(BlueprintPure=false)
int32 BlueprintPureFalseFunction() const;
Array Parm
Position:
Meta
Type:
string
Related:
UFUNCTION(meta=(ArrayParm="abc"))
This only seems to be used in KismetArrayLibrary.h
where it's used with CustomThunk
-marked functions. Note that this is "ArrayParm" and not "ArrayParam".
Array Type Dependent Params
Position:
Meta
Type:
string
UFUNCTION(meta=(ArrayTypeDependentParams="abc"))
Auto Create Ref Term
Position:
Meta
Type:
string (Comma-separated list)
UFUNCTION(meta=(AutoCreateRefTerm="abc"))
Without AutoCreateRefTerm
, a reference paramter requires that the user provide it with a value, which can be annoying for parameters that have a sensible default. When a blueprint is compiled where those parameters are not supplied with a value, an error like this will be shown "The current value of the 'Color' pin is invalid: 'Color' in action 'Some Color Without Ref' must have an input wired into it ("by ref" params expect a valid input to operate on)."
Note that it's possible to set multiple ref parameters by using a comma-separated list.
UFUNCTION(BlueprintCallable)
void SomeColorWithoutRef(const FLinearColor& Color) {}
UFUNCTION(BlueprintCallable, meta=(AutoCreateRefTerm="Color"))
void SomeColorWithRef(const FLinearColor& Color) {}
Blueprint Autocast
Position:
Meta
Type:
flag
UFUNCTION(meta=(BlueprintAutocast))
In Blueprints when you a drag a connection from pin of one type to another, Unreal can automatically cast from the incoming type to the other. BlueprintAutocast
is the way to make your own Blueprint helper functions to do that cast action. BlueprintAutocast
requires the function to be static, public, BlueprintPure
, have at least 1 input, and have a return output. Only the first input will be considered for auto conversion, but you can have multiple.
public:
UFUNCTION(BlueprintPure, meta=(BlueprintAutocast))
static EAnimal IntToAnimal(int32 Input);
Blueprint Internal Use Only
Position:
Meta
Type:
bool
UFUNCTION(meta=(BlueprintInternalUseOnly=true))
Blueprint Protected
Position:
Meta
Type:
flag
UFUNCTION(meta=(BlueprintProtected))
Callable Without World Context
Position:
Meta
Type:
flag
UFUNCTION(meta=(CallableWithoutWorldContext))
Commutative Associative Binary Operator
Position:
Meta
Type:
flag
UFUNCTION(meta=(CommutativeAssociativeBinaryOperator))
Sealed Event
Position:
Main
Type:
flag
UFUNCTION(SealedEvent)
Custom Structure Param
Position:
Meta
Type:
string
UFUNCTION(meta=(CustomStructureParam="abc"))
Default To Self
Position:
Meta
Type:
flag
UFUNCTION(meta=(DefaultToSelf))
Deprecated Function
Position:
Meta
Type:
flag
Related:
UFUNCTION(meta=(DeprecatedFunction))
Deprecation Message
Position:
Meta
Type:
string
Related:
UFUNCTION(meta=(DeprecationMessage="abc"))
Determines Output Type
Position:
Meta
Type:
string
Related:
UFUNCTION(meta=(DeterminesOutputType="abc"))
UFUNCTION(BlueprintCallable, Category="Utilities", meta=(WorldContext="WorldContextObject", DeterminesOutputType="ActorClass", DynamicOutputParam="OutActors"))
static void GetAllActorsOfClass(const UObject* WorldContextObject, TSubclassOf<AActor> ActorClass, TArray<AActor*>& OutActors);
Expand Enum As Execs
Position:
Meta
Type:
string (name of enum parameter)
UFUNCTION(meta=(ExpandEnumAsExecs="abc"))
UENUM()
enum class EAnimalType : uint8
{
Cat,
Dog,
Rooster
};
UFUNCTION(BlueprintCallable, meta=(ExpandEnumAsExecs="Animal"))
static void SwitchAnimalByName(FString Name, EAnimalType& Animal);
Expand Bool As Execs
Position:
Meta
Type:
string (name of bool parameter)
UFUNCTION(meta=(ExpandBoolAsExecs="abc"))
Note that "ReturnValue" is a special string used to refer to the return value of the function.
UFUNCTION(BlueprintCallable, meta=(ExpandBoolAsExecs="ReturnValue"))
static bool IsAboveFreezing(float Temperature);
UFUNCTION(BlueprintCallable, meta=(ExpandBoolAsExecs="bFreezing"))
static void IsAboveFreezing(float Temperature, bool& bFreezing);
Dynamic Output Param
Position:
Meta
Type:
string (Parameter name)
Related:
UFUNCTION(meta=(DynamicOutputParam="abc"))
UFUNCTION(BlueprintCallable, Category="Utilities", meta=(WorldContext="WorldContextObject", DeterminesOutputType="ActorClass", DynamicOutputParam="OutActors"))
static void GetAllActorsOfClass(const UObject* WorldContextObject, TSubclassOf<AActor> ActorClass, TArray<AActor*>& OutActors);
Allow Private Access
Position:
Meta
Type:
bool
UFUNCTION(meta=(AllowPrivateAccess=true))
( Parameter Name= Default Value)
Position:
Meta
Type:
string
UFUNCTION(meta=((ParameterName=DefaultValue)="abc"))
Not sure how to describe this one. Technically it doesn't have a name. Use it to give a parameter a default value, and override any existing C++ default value. See the examples and screenshots for how it affects what is displayed in-editor.
UFUNCTION(BlueprintCallable, meta=(Number="99"))
void DefaultParamInMeta(int32 Number);
UFUNCTION(BlueprintCallable)
void DefaultParamInCPP(int32 Number = 99);
UFUNCTION(BlueprintCallable, meta=(Number="1"))
void DefaultParamInBoth(int32 Number = 99);
UFUNCTION(BlueprintCallable, meta=(ComponentClass="ActorComponent"))
void DefaultTSubclassValue(TSubclassOf<UActorComponent> ComponentClass);
UFUNCTION(BlueprintCallable, meta=(RectColor="(R=0,G=1,B=0,A=1)"))
void DefaultStructValue(FLinearColor RectColor);
Editor
Call In Editor
Position:
Main
Type:
flag
UFUNCTION(CallInEditor)
Causes a UFUNCTION
with no parameters and no return value to be shown in the details panel of object instances.
Could be useful for adding helper functions to change the values on the selected instance. For example increasing the level of an enemy by changing their stats, or filling out default values using C++.
To reiterate, only works with functions that have no parameters, and return void
. BlueprintCallable
is not required. Only works on instances of the class. So Actors placed in a level or data assets, not on Blueprint classes.
This works as a flag in the main position, or as a boolean in the meta position. I would stick to the Main position just because there are more examples of this in the Unreal codebase.
UFUNCTION(Category="Helper Functions", CallInEditor)
void AutofillData();
UFUNCTION(Category="Helper Functions", CallInEditor)
void ReticulateSplines();
UFUNCTION(Category="Helper Functions", CallInEditor)
void IncreaseLevel();
// This works
UFUNCTION(CallInEditor)
void MainPosition();
// This also works, but I wouldn't use it
UFUNCTION(meta=(CallInEditor=true))
void MetaPosition();
C++
Custom Thunk
Position:
Main
Type:
flag
UFUNCTION(CustomThunk)
I'm still not very familiar with this but check out KismetArrayLibrary.h
for an implementation that uses it.
Console
Exec
Position:
Main
Type:
flag
UFUNCTION(Exec)
Unreal has an in-game cheat console, accessed with the tilde key by default. It's great for adding debug commands and cheats. Any UFUNCTION
marked with Exec
can be executed there and provided with parameters.
The classes that are supported by Exec
by default are:
UWorld
UPlayerInput
UGameInstance
APlayerController
APawn
AHUD
AGameModeBase
ACheatManager
AGameStateBase
APlayerCameraManager
Appearance
Advanced Display
Position:
Meta
Type:
string or integer
UFUNCTION(meta=(AdvancedDisplay)
Compact Node Title
Position:
Meta
Type:
string
UFUNCTION(meta=(CompactNodeTitle="abc"))
UFUNCTION(BlueprintPure)
FString WithoutCompactTitle(bool InBool);
UFUNCTION(BlueprintPure, meta=(CompactNodeTitle = ":)"))
FString WithCompactTitle(bool InBool);
Display Name
Position:
Meta
Type:
string
UFUNCTION(meta=(DisplayName="abc"))
Return Display Name
Position:
Meta
Type:
string
UFUNCTION(meta=(ReturnDisplayName="abc"))
Change the label on the return value from the default "Return Value" to the specified string.
It's also possible to achieve the same thing by adding a UPARAM()
outside of the main UFUNCTION()
specifier. See the second example for how to do it.
UFUNCTION(BlueprintCallable, Category = "Doggy Daycare", meta=(ReturnDisplayName = "Success"))
bool TryPetDog(const FName Name);
// Does the same thing but looks gross
UFUNCTION(BlueprintCallable, Category = "Doggy Daycare")
UPARAM(meta=(DisplayName="Success"))
bool TryPetDog(const FName Name);
Hide Pin
Position:
Meta
Type:
string
UFUNCTION(meta=(HidePin="abc"))
Hide Self Pin
Position:
Meta
Type:
UFUNCTION(meta=(HideSelfPin)
Short Tool Tip
Position:
Meta
Type:
string
UFUNCTION(meta=(ShortToolTip="abc"))
Tool Tip
Position:
Meta
Type:
string
UFUNCTION(meta=(ToolTip="abc"))
Debug
Development Only
Position:
Meta
Type:
flag
UFUNCTION(meta=(DevelopmentOnly))
Internal Use Param
Position:
Meta
Type:
string
UFUNCTION(meta=(InternalUseParam="abc"))
Key Words
Position:
Meta
Type:
string (space-separated list)
UFUNCTION(meta=(KeyWords="abc"))
General
Latent
Position:
Meta
Type:
Related:
UFUNCTION(meta=(Latent)
Latent Info
Position:
Meta
Type:
string
Related:
UFUNCTION(meta=(LatentInfo="abc"))
Native Break Func
Position:
Meta
Type:
UFUNCTION(meta=(NativeBreakFunc)
Not Blueprint Thread Safe
Position:
Meta
Type:
UFUNCTION(meta=(NotBlueprintThreadSafe)
Unsafe During Actor Construction
Position:
Meta
Type:
UFUNCTION(meta=(UnsafeDuringActorConstruction)
World Context
Position:
Meta
Type:
string
UFUNCTION(meta=(WorldContext="abc"))
Materials
Material Parameter Collection Function
Position:
Meta
Type:
UFUNCTION(meta=(MaterialParameterCollectionFunction)
Network
Server
UFUNCTION(Server
Client
UFUNCTION(Client)
Net Multicast
Position:
Main
Type:
UFUNCTION(NetMulticast
Blueprint Authority Only
Position:
Main
Type:
flag
UFUNCTION(BlueprintAuthorityOnly)
With Validation
Position:
Main
Type:
UFUNCTION(WithValidation
Blueprint Cosmetic
Position:
Main
Type:
flag
UFUNCTION(BlueprintCosmetic)
Reliable
UFUNCTION(Reliable
Service Request
Position:
Main
Type:
Related:
UFUNCTION(ServiceRequest
Service Response
Position:
Main
Type:
Related:
UFUNCTION(ServiceResponse
Data Tables
Data Table Pin
Position:
Meta
Type:
string
UFUNCTION(meta=(DataTablePin="abc"))
Blueprint
Set Param
Position:
Meta
Type:
string (Groups are separated by commas, params are separated by pipe.)
Requires:
Related:
UFUNCTION(meta=(SetParam="abc"))
Using SetParam
allows you to make "templated" Blueprint functions for Set containers that work for any datatype. It requires a CustomThunk
-generated function definition for it to work. For an example check BlueprintSetLibrary
.
In the Blueprint function declaration you write int32
but with these metadata specifiers and CustomThunk you can make it work for any datatype.
// An arbitrary function that takes a set of any type and does something with it
UFUNCTION(BlueprintCallable, CustomThunk, meta=(SetParam="SetToCheck|Value"))
static void CheckSet(const TSet<int32>& SetToCheck, int32 Value);
Map Param
Position:
Meta
Type:
string (Groups are separated by commas, params are separated by pipe.)
Requires:
Related:
UFUNCTION(meta=(MapParam="abc"))
Using MapParam
allows you to make "templated" Blueprint functions for Map containers that work for any datatype. It requires a CustomThunk
-generated function definition for it to work. For an example check BlueprintMapLibrary
.
To add other parameters that match the types of the key and value of the Map, check MapKeyParam
and MapValueParam
.
In the Blueprint function declaration you write int32
but with these metadata specifiers and CustomThunk you can make it work for any datatype.
// An arbitrary function that takes a map of any type and does something with it
UFUNCTION(BlueprintCallable, CustomThunk, meta=(MapParam="SomeMap"))
static void CheckMap(TMap<int32, int32>& SomeMap);
Map Key Param
Position:
Meta
Type:
string (Groups are separated by commas, params are separated by pipe.)
Requires:
Related:
UFUNCTION(meta=(MapKeyParam="abc"))
Allows you to specify a parameter which must match the type of the Key in the matching MapParam
. Can be used with MapValueParam
to add parameters that must match both Key and Value types. If your function needs multiple TMap
inputs, I think it's possible to specify which one the MapParam
corresponds to by using commas to make groups. In the Blueprint function declaration you write int32
but with these metadata specifiers and CustomThunk you can make it work for any datatype.
UFUNCTION(BlueprintCallable, CustomThunk, meta=(MapParam="MapToCheck", MapKeyParam="KeyBlah"))
static void CheckMap(TMap<int32, int32>& MapToCheck, const int32& KeyBlah);
Map Value Param
Position:
Meta
Type:
string (Groups are separated by commas, params are separated by pipe.)
Requires:
Related:
UFUNCTION(meta=(MapValueParam="abc"))
Allows you to specify a parameter which must match the type of the Value in the matching MapParam
. Can be used with MapKeyParam
to add parameters that must match both Key and Value types. If your function needs multiple TMap
inputs, I think it's possible to specify which one the MapParam
corresponds to by using commas to make groups. In the Blueprint function declaration you write int32
but with these metadata specifiers and CustomThunk you can make it work for any datatype.
UFUNCTION(BlueprintCallable, CustomThunk, meta=(MapParam="MapToCheck", MapValueParam="ValueBlah"))
static void CheckMap(TMap<int32, int32>& MapToCheck, const int32& ValueBlah);