Float Variable With Slider Range From C++

Hello,
I’m trying to design a procedural mesh component class in C++, with a floating point variable that is EditAnywhere, with a slider range specified so that the floating point variable is displayed with a textbox that includes the slider capabilities. Can someone point me to the documentation that shows how to do that in C++? I see how to set the slider values if the variable is defined inside the editor. Also, ideally it would be a double-precision variable, not a single-precision float…

Thanks!



UPROPERTY(EditAnywhere,Category = DefProps , meta=(UIMin = '0.0', UIMax = '1.0'))
float MyValue; 


2 Likes

Minor but important correction, the value must be specified within double quotes not single quotes. So the correct code would be this

UPROPERTY(EditAnywhere,Category = DefProps , meta=(UIMin = “0.0”, UIMax = “1.0”))
float MyValue;

XD, i didn’t notice it was 9 years ago

1 Like