Download

Can't save UMG options for combobox or slider

I’m working on an options menu for my game. Once the options are changed you can see the result so I know they work but when you open up the options menu again the sliders and comboboxes are all reset or empty.
I tried saving the selections out to a file using the save object blueprint so I can reference them later but it doesnt seem to be saving anything.

When I start the game up and press options it says that it loaded the low setting which seems to be the case since the shadows are gone but I don’t understand where its getting this value. The shadow quality variable is set to a default of high and so is the saved shadow quality. I can change the value and the scene updates properly and stays that way even when I press back but when I open the options menu again it switches to low on its own.

I can’t figure out where its getting that value from or why it switches to it every time I open the options menu.

Any help would be appreciated.

14f47e9836ce387512e9418c3db018cfadcbeead.jpeg
97e5a7a1ad4bbd4d34ff8917c325b4396e823840.jpeg
fca8e1785a8076e68930ed4b541583bfce321ba9.jpeg

I decided to start from the bare minimum and work up again. This is all that is needed to set the shadow quality using a combobox.
ShadowQuality1.JPG
It no longer defaults to low every time I open the options menu but when you come back into the options menu the combobox is blank.
ShadowQuality2.JPG
If I set the selected item in the designer view then it shows up as that value every single time you open the menu regardless of what you selected.
c262a78fc360d43a8f4df65abe1ac493865fd685.jpeg
abaaeefb0c98c26ead66f19ac7534c3ab419bd26.jpeg
I tried to set the selected option to whatever the value was changed to but it doesn’t seem to make any difference at all. If the manual input was set to high it would read high whenever it was opened again regardless if it was set in the script and if it was left blank it would be blank next time options was opened.
64aade94c95a43a64189328721f9b0d441e0ff09.jpeg

I figured out what I was doing wrong. There has to be a variable outside of the widget that contains the information you want to store. I stored mine in the player controller but plan on moving it to the gamestate. Here is the blueprint fix:
fc6fec3573d04ec42ef81a4cb98b02b09337acb2.jpeg
fix2.JPG