Function Parameter Metadata

Hey Guys,

I have a quick question. There is a bunch of documentation lacking regarding UPARAM(…) and I wanted to know how I can define the DisplayName of a UFunction Parameter. I tried doing something like this…

void Setup(UPARAM(DisplayName = “Mesh”) class UStaticMesh* InMesh);

I also tried using FriendlyName (which is usually used for functions) and even though both compile, when I access the function in Blueprints, it still uses ‘In Mesh’ as the displayed parameter name. The problem I’m running into is because how FNAME works, I can’t have a function parameter name with the same name as a local variable so I’d like to call my variable ‘InVariable’ to avoid that but redefine how it looks in Blueprints. Any thoughts?

Thanks!

Digging this up a bit, but was trying to figure it out, myself. For future travellers (this is one of the top results when searching), this is how it’s done in-engine with 4.9.1:

KismetMathLibrary.h [1236]


/** Makes a rotator {Roll, Pitch, Yaw} from rotation values supplied in degrees */
UFUNCTION(BlueprintPure, Category="Math|Rotator", meta=(Keywords="construct build rotation rotate rotator makerotator", NativeMakeFunc))
static FRotator MakeRotator(
	UPARAM(DisplayName="X (Roll)") float Roll,	
	UPARAM(DisplayName="Y (Pitch)") float Pitch,
	UPARAM(DisplayName="Z (Yaw)") float Yaw);