I’m working on my Options menu and want the changes the player makes to be persistent. For options like video settings there is a function UGameUserSettings::SaveSettings()
which saves user settings to persistent storage.
But what about other settings like rebinding game controls? Are these usually saved in an .INI file?
I see that ShooterGame defines its own UShooterGameUserSettings
class which has some additional things and then changes the DefaultEngine.ini file:
GameUserSettingsClassName=/Script/ShooterGame.ShooterGameUserSettings
Is this where I would store the user’s key bindings? Would I make a new UCLASS(Config=Game)
with UPROPERTY(Config)
and then save the changes to an .INI file?
Or can I do something with the PlayerController’s UPlayerInput
which looks like it stores the Action and Axis mappings? Any hints on how this is typically used to persist changes made in the Options menu?