Keep slider position after reactivating the widget

Hello UE4 developers!
I’m solving material change system for my work project. The goal is to click on asset and change color via HSV sliders.
Everything works fine except one thing. Whenever i click again on the same asset where the color has been changed my material is reseted back to original one and 0,0,0 values on sliders. Any tips how to keep sliders on their postions after setting them? Thanks in advance to everyone for tips :slight_smile:

PS: Wud love to know at least how to add number values to those sliders.

Widget blueprint:

Asset blueprint:

Material:

So I click on the door the widget shows up i set up a color, close it and everything is fine…

Can run around the color holds till I want to upgrade it … there comes the problem the slider setup resets to original

Hello!

Problem is super “simple” you add a new widget class everytime when you click on the door…
After you add this widget, your blueprint setting parameter on material via the added widget… That means actually you set default “Color Pick” from newly added widget in tick…

I think you should save Color in BP_Door itself and update them from Widget or you can save a created widget object reference in your BP_Door and check if you have valid widget you should set visibility instead of creating a new widget…

Maan youre tha best! Thanks … I hate when I can’t solve simple problem, but the eufory after solving it YAAAAAAY true feeling of FFS(fuking finally solved!)! U made my day thanks a lot!!

Solution:

you are welcome… but this code will not work if you wanna more door :slight_smile:
because you will do for loop on all added material widget and set color with each iteration…
Try this instead of foor loop (sry i dont have ue4 on my fulltime work pc)

Saved day number 2…:smiley: Thanks !!