I have a UI Widget Blueprint, and trying to add a function to handle all the videos settings. To do this efficiently, I would like to load Game User Settings and then call one function to set the video settings, another for the audio, etc. For the video settings function, I need to create an input of type Game User Settings (object reference), but that object type is not available in the editor. I feel I am missing something that should be very obvious. Does anyone have any thoughts as to why I can’t add an object reference to Game User Settings, in a Blueprint function?
You can call Get Game User Settings / Set Game User Settings directly inside the Widget. Make sure to call Apply Settings to save correctly on event destruct or if using a confirm button.
Thank you for the reply and the examples. I am trying to structure things a bit different. I have one function called Get_AllSettings, that calls the Get Game User Settings node, followed by Validate Settings and then Load Settings. From there, I would like to call a new function named Get_VideoSettings, and pass in the instance of Game User Settings I loaded from Get_AllSettings.
I did find a solution to the problem though. Even though Game User Settings is not selected as an input type, I found that if I simple add the full functionality to Get_AllSettings, I can then select the portion I need for the Get_VideoSettings function, and then use the Collapse To Function feature of the editor, it will create the new function for me, complete with the desire input and type. Not sure why the Game User Settings type is not available as a type selection, but at least I was able to structure things as I needed to.
Thank you for your assistance. I am still learning some of the quirks with the editor, and appreciate your help.
Probably because the Settings values do not persist in memory and rather exist in anini
file. You could create your own class to cache particular settings but it’s pointless (pardon the pun); unless you’re updating these values rapidly like in a slider. For this scenario, you could create a debounced event (retriggerable delay).