How to set slider position so it doesn't reset to default

Hey,

I don’t know how but I made postprocess changes via widget possible.
I heave a slider that sets the gain(brightness)
Everything is working just fine except for when I close the widget and open it up again the slider position goes back to its default position.

How do I make the slider remember the position of what I set it to?
Thanks in advance.

I’m guessing that when you close the widget, you probably remove it from the viewport and it gets invalidated, so you need to create a brand new widget next time. And the variables are reset to defaults.

One solution is to simply hide/show it rather than recreate it from scratch - this way it will remember its own variable values.

Another solution is to store the settings externally, perhaps in the actor that spawned the widget. Every time you recreate it, feed the widget the remembered values through a variable that is exposed on spawn. Don’t forget to set them while you fiddle with the slider.

Oh I solved it I added the construct widget node to the event play node and called only open and close animation when opening and closing the widget! Thx so much for pointing me in the right direction.