|
|
| UserSettingsService (IPlayerPrefs playerPrefs, string encryptionKey) |
| |
| bool | HasKey (string key) |
| | If true, a setting with this key exists in user settings.- Parameters
-
|
| |
| void | DeleteKey (string key) |
| | Removes a user setting by key.- Parameters
-
| key | The key of the user setting to remove. |
|
| |
| 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.- Exceptions
-
| ArgumentException | Thrown if the key does not exist. |
|
| |
| float | GetFloat (string key) |
| | Tries to get a float from user settings.- Exceptions
-
| ArgumentException | Thrown if the key does not exist. |
|
| |
| string | GetString (string key) |
| | Tries to get a string from user settings.- Exceptions
-
| ArgumentException | Thrown if the key does not exist. |
|
| |
| string | GetEncryptedString (string key) |
| | Tries to get and decrypt a string from user settings.- Exceptions
-
| ArgumentException | Thrown if the key does not exist. |
|
| |
| T | GetObject< T > (string key) |
| | Tries to get an object from user settings.- Exceptions
-
| ArgumentException | Thrown if the key does not exist. |
|
| |
| T | GetEncryptedObject< T > (string key) |
| | Tries to get and decrypt an object from user settings.- Exceptions
-
| ArgumentException | Thrown if the key does not exist. |
|
| |