Data Persistance #
At some point in the development cycle for any game, it may become apparent that there exists a need to store data on disk. One of the most common ways to store data on disk in a Unity game is by using Player Preferences. Player preferences are a quick and easy way to store non-critical data on disk.
Player Preferences are NOT encrypted by default. #
Values saved to player preferences can easily be located on the system and modified at will.
To counteract this, we simply provide a wrapper class to encrypt data before saving it to disk. This wrapper will then also decrypt it on demand when accessing the value from disk.
Using ObscuredPrefs #
The ObscuredPrefs class is static and can therefore be used with out an instance. Please see XML function declaration comments for a more in-depth summary of the functions available.