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 expos...

Updated over 4 years ago Edit Page Revisions

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`` &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`` &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++.

Related

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