How to set the maximum and minimum value for the variable?

How to set the maximum and minimum value for the variable? The blueprint is a function of Max and Min. As will be in C ++?

I assume you mean when editing blueprints

 UPROPERTY(EditAnywhere, Category = "MyCategory", meta=(ClampMin = "0.0", ClampMax = "100.0", UIMin = "0.0", UIMax = "100.0"))
     float MyVar;
2 Likes