Unfortunately you can’t do that. Except for a couple types, templates aren’t compatible with UPROPERTY.
The thing to check with that sort of error is to always go to the type declaration and see if it has a UCLASS/USTRUCT/UENUM macro. UPROPERTIES require one of those in order to match up the reflection data of the property to the reflection data of the member. If the type isn’t reflected, it can’t be a property.
If I try that I get the following error:
Found ‘g15’ when expecting ‘,’ or ‘)’ while parsing Variable specifiers in Member variable declaration in class ‘MyclassName’ Myprojectname.
This doesn’t cover the use case above, which is asking for a range variable that denotes a user defined min and max value. Your example is a float which is clamped by a hard coded range.
If you’re looking for a TRange that can be a UPROPERTY, try the FFloatRange struct. It isn’t documented very well, but it functions near identially and in editor it has a nice property UI. You can also make either side inclusive, exclusive, or open like you would with a TRange.