I’m trying to setup my project so the user doesn’t have to constantly type in the default value into a spin box.
To do this, I’m storing the spinbox value which the user first inputs from the menu into the gameinstance and then I’m trying to pull this value back into spinbox in the menu from the gameinstance.
I’ve done this by binding the attached function to the spinbox value field. It pulls in the variable but its locked out from there, I can no longer change its value in the UI.
When you bind a function like you did, it fires every frame and overrides the data the user tries to set manually. The only way to change this value now is to change the DurationRequest variable in the GameInstance blueprint.
You would need to reverse this setup. Rather than having the widget pull the variable from the GI, make the GI push the default variable in as spinbox value, and only when needed.
remove the binding from spinbox
when a default value needs to be displayed, obtain the reference to this widget >> get spinbox >> set value (pull it from the GI)
Alternatively:
remove the binding from spinbox
create a CustomEvent in the widget that updates the value of the spinbox using the default value pulled out of the GI