Is it possible to change UPROPERTY UIMin/Max specifiers at runtime?

I have a custom struct that is used to define a range of float values. It’s used in different places that each should have different UI/clamp min/max values.

Ideally I would create my struct with FMyStruct(minValue, maxValue, uiMin, uiMax) and it would set those values at runtime.

Is it possible to do this?

1 Like

Yes, it is possible, but I am not sure yet if it is safe.

You can set metadata keys on the property. Keys are the same as UPROPERTY(meta=…) keywords (i.e.: “UIMax”, “ClampMax”, “Units”). In my case I need to limit some helper/secondary property to half the value of some basic/primary property and following code works fine in PostEditChangeProperty method.