Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics

Rebinding & Use of PlayerPrefs

A topic by arvz created May 25, 2018 Views: 148 Replies: 1
Viewing posts 1 to 2

Hey Sophie,

I'm having a look at the Rebinding scene, and it looks like rebinding makes heavy use of PlayerPrefs internally. 

As you probably know - PlayerPrefs isn't supported universally on all platforms, especially on console (even though they kind of work on a surface level). This kind of limits the platforms Sinput can be used if I want to make use of the rebinding system. 

I was thinking instead of saving the Rebinded keys to PlayerPrefs, couldn't you just create a new control scheme with the rebinded keys? The game just needs to remember that the player's using a custom scheme. When the player clicks 'reset to default', the custom scheme can be deleted and the game can go back to using the default scheme. 

Developer (1 edit)

Saving custom binding is definitely another area I need to look at. Not even all of the important settings are saved in the current version (bindings are, but not toggles/inverts/sensitivity/scaling)

I do have plans for alternative options to player prefs and I've even coded other save systems that I could probably pull into Sinput with very little work.

Update: Sinput now saves all of it's settings as well as custom binding, and on PC it writes to a file instead of Player Prefs too. :)