|
Kanda Foundation 0.2.0
|
Provides a way to persist user settings between application sessions. This is implemented using Unity PlayerPrefs with some handy tools for saving complex objects and sensitive data. More...
Inheritance diagram for IUserSettingsService:Public Member Functions | |
| bool | HasKey (string key) |
| If true, a setting with this key exists in user settings. | |
| void | DeleteKey (string key) |
| Removes a user setting by key. | |
| void | ForceSave () |
| Forces user settings to be committed to disk. This should happen automatically when application exits, so use only if it is critical that a setting gets committed in case of application crash. | |
| void | SetInt (string key, int value) |
| Commits an integer to user settings. | |
| void | SetFloat (string key, float value) |
| Commits a float to user settings. | |
| void | SetString (string key, string value) |
| Commits a string to user settings. | |
| void | SetStringWithEncryption (string key, string value) |
| Encrypts and commits a string to user settings. | |
| void | SetObject< T > (string key, T value) |
| Commits an object to user settings by serializing it as a JSON string. | |
| void | SetObjectWithEncryption< T > (string key, T value) |
| Encrypts and commits an object to user settings by serializing it as a JSON string. | |
| int | GetInt (string key) |
| Tries to get an int from user settings. | |
| float | GetFloat (string key) |
| Tries to get a float from user settings. | |
| string | GetString (string key) |
| Tries to get a string from user settings. | |
| string | GetEncryptedString (string key) |
| Tries to get and decrypt a string from user settings. | |
| T | GetObject< T > (string key) |
| Tries to get an object from user settings. | |
| T | GetEncryptedObject< T > (string key) |
| Tries to get and decrypt an object from user settings. | |
Provides a way to persist user settings between application sessions. This is implemented using Unity PlayerPrefs with some handy tools for saving complex objects and sensitive data.
| void DeleteKey | ( | string | key | ) |
Removes a user setting by key.
| key | The key of the user setting to remove. |
Implemented in UserSettingsService.
| void ForceSave | ( | ) |
Forces user settings to be committed to disk. This should happen automatically when application exits, so use only if it is critical that a setting gets committed in case of application crash.
Implemented in UserSettingsService.
| T GetEncryptedObject< T > | ( | string | key | ) |
Tries to get and decrypt an object from user settings.
| ArgumentException | Thrown if the key does not exist. |
Implemented in UserSettingsService.
| string GetEncryptedString | ( | string | key | ) |
Tries to get and decrypt a string from user settings.
| ArgumentException | Thrown if the key does not exist. |
Implemented in UserSettingsService.
| float GetFloat | ( | string | key | ) |
Tries to get a float from user settings.
| ArgumentException | Thrown if the key does not exist. |
Implemented in UserSettingsService.
| int GetInt | ( | string | key | ) |
Tries to get an int from user settings.
| ArgumentException | Thrown if the key does not exist. |
Implemented in UserSettingsService.
| T GetObject< T > | ( | string | key | ) |
Tries to get an object from user settings.
| ArgumentException | Thrown if the key does not exist. |
Implemented in UserSettingsService.
| string GetString | ( | string | key | ) |
Tries to get a string from user settings.
| ArgumentException | Thrown if the key does not exist. |
Implemented in UserSettingsService.
| bool HasKey | ( | string | key | ) |
If true, a setting with this key exists in user settings.
| key | The key to check. |
Implemented in UserSettingsService.
| void SetFloat | ( | string | key, |
| float | value ) |
Commits a float to user settings.
Implemented in UserSettingsService.
| void SetInt | ( | string | key, |
| int | value ) |
Commits an integer to user settings.
Implemented in UserSettingsService.
| void SetObject< T > | ( | string | key, |
| T | value ) |
Commits an object to user settings by serializing it as a JSON string.
Implemented in UserSettingsService.
| void SetObjectWithEncryption< T > | ( | string | key, |
| T | value ) |
Encrypts and commits an object to user settings by serializing it as a JSON string.
Implemented in UserSettingsService.
| void SetString | ( | string | key, |
| string | value ) |
Commits a string to user settings.
Implemented in UserSettingsService.
| void SetStringWithEncryption | ( | string | key, |
| string | value ) |
Encrypts and commits a string to user settings.
Implemented in UserSettingsService.