Undo slider in an EditorWindow

Hi,

I can’t seem to figure out how to undo changes on a GUILayout.Slider in an editorwindow.

Any suggestions?

What have you tried?

Have you tried using Undo.RecordObject before modifying the object?