UPARAM

Description

UPARAM is a macro used to alter the behavior of function parameters.

Valid Specifiers

ref

By default, a BlueprintCallable function that takes a parameter passed by reference, will expose that parameter as a **output** pin (return value) instead of an input pin. You can change this behavior using a UPARAM(ref) macro.

Example:

 UFUNCTION(BlueprintCallable)
 static void ModifySomeArray(TArray<bool> &BooleanArray);

The above function would have zero input pins and one output pin named BooleanArray. However, take this example:

 UFUNCTION(BlueprintCallable)
 static void ModifySomeArray(UPARAM(ref) TArray<bool> &BooleanArray);

In this case, the function would have zero output pins, and one input pin named BooleanArray, which would take an array of bool values.

DisplayName

Changes the pin label to one that you desire. Allows for use of reserved characters not normally allowed in variable names in C++.

Example static FRotator MakeRotator(
UPARAM(DisplayName="X (Roll)") float Roll,
UPARAM(DisplayName="Y (Pitch)") float Pitch,
UPARAM(DisplayName="Z (Yaw)") float Yaw
);

Related

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