ES2Settings
Constructors
Properties
ES2Settings. SaveLocation |
location | Where Easy Save should save. Accepted values are: ES2Settings.SaveLocation.File Default ES2Settings.SaveLocation.PlayerPrefs Web Default ES2Settings.SaveLocation.Resources Load Only |
bool |
encrypt | Whether or not to encrypt our data." |
string |
encryptionPassword | The password to use when encrypting. Password may only contain characters A-Z, a-z, 0-9 and ! @ # $ . – ; : * < > % ^ ( ) + ] |
ES2Settings. |
encryptionType | The type of encryption to use. Accepted values are: ES2Settings.EncryptionType.AES128 Default ES2Settings.EncryptionType.Obfuscate |
string |
webUsername | The username used for saving and loading from web. This must match the one specified in the ES2.php file. |
string |
webPassword | The password used for saving and loading from web. This must match the one specified in the ES2.php file. |
string |
webFilename | Used to specify what file we want to save to when saving and loading from web. |
Description
The ES2Settings object can be supplied to some ES2 methods, but will be overridden by any tags or parameters specified in a path.
C#
Save data using an ES2Settings object to specify settings.
1 2 3 4 5 6 7 8 9 10 |
// Create a new ES2Settings with defaults, but set tag to 'mySettingsTag'. ES2Settings settings = new ES2Settings("myFile.txt"); // Enable encryption and set an encryption password. settings.encrypt = true; settings.encryptionPassword = "myPassword"; settings.tag = "mySettingsTag"; /* This will save 123 to a tag named 'mySettingsTag' in myFile.txt, with encryption. */ ES2.Save(123, "myFile.txt", settings); |
JS
Save data using an ES2Settings object to specify settings.
1 2 3 4 5 6 7 8 9 10 |
// Create a new ES2Settings with defaults, but set tag to 'mySettingsTag'. var settings = new ES2Settings("myFile.txt"); // Enable encryption and set an encryption password. settings.encrypt = true; settings.encryptionPassword = "myPassword"; settings.tag = "mySettingsTag"; /* This will save 123 to a tag named 'mySettingsTag' in myFile.txt, with encryption. */ ES2.Save(123, "myFile.txt", settings); |