How do I undo slider changes?

For the life of me I don’t know how Undo class works for EditorGuiLayout.Slider

Undo.RecordObject seems to work with everything else, float fields, toogle booleans, enum popups, everything seems to work.

But with sliders it doesn’t record anything. If the last recorded was was a “Selection Change”, when I slide the slider, the last recorred Undo is still “Selection Change”.

And it’s funny because I have a vague recollection of sliders undo working… but now I fear I must have dreamt it. :-\

Can anyone give me a small example of how a single slider work with Undo?

Undo slider was bugged:

but I guess it’s still bugged.

Hm, so with a simple range attribute ( Range(0f, 1f) ) I don’t have any problems undoing the slider, so it shouldn’t be a problem in general… (Unity 5.6.4)

So maybe I’m not crazy after all, I remember sliders undo working.

Maybe after I updated Unity I’m being afected by the bug.

Good news I guess, so I’ll just postpone worrying about it for now.