Encryption & Versioning
Prerequisites
The encryption feature is only active when the DataProtector package is installed.
Once DataProtector is installed, the Assembly Definition automatically defines the USE_ENCRYPT symbol, and the Builder's UseEncryption() and UseVersion() methods become available.
UseEncryption
SaveData/SaveDataAsync: serializes then encrypts before writing.LoadData/LoadDataAsync: decrypts then deserializes.
Keep your encryption key safe. Changing the key will make existing save files unreadable.
UseVersion
Specifying a version appends the version number to the file name, letting you separate saves across game updates.
Resulting file paths:
Migration Pattern
Example of migrating from an old version's save file to a new one.
Encryption Only (No Version)
If UseVersion is not called, the version defaults to 0 and the file name becomes TypeName_0.acqs.