@Editable ?int ignores type-macro clamping in Editor

Summary

If you clamp :int using a type-macro type{X:int where 0<X}
The editor will do some delicious clamping to ensure the value is never out-of-range <3
This does not happen if it’s made optional; optional’s can go out-of-range.

Please select what you are reporting on:

Unreal Editor for Fortnite

What Type of Bug are you experiencing?

UI/Tools

Steps to Reproduce

@editable
MaxGold:type{X:int where X<=100} = 100
# cant slide to 101 in UEFN Editor

@editable
MaybeMaxGold:?type{X:int where X<=100} = option{100}
# slides to 101 in UEFN Editor

OnBegin()
    Print("{MaxGold}")    #100
    if (Result := MaybeMaxGold?) then Print("{Result}")    #101

Expected Result

Expected? Probably internally, MaybeMaxGold could revert to it’s verse-default when out-of-range.
Eventually: That clamping sugar you did for int would be awesome if that’s also possible for ?int

Observed Result

MaybeMaxGold can be set to anything via the UEFN editor

Platform(s)

PC

This topic was automatically closed after 180 days. New replies are no longer allowed.