Getting Started
Prerequisite: install MemoryPack
Quick Save depends on MemoryPack. First, install MemoryPack via NuGetForUnity.
- Install NuGetForUnity in your project.
- Open NuGet > Manage NuGet Packages from the Unity menu.
- Search for
MemoryPackand install it.
Installation
Unity Package Manager (UPM) — recommended
- Open Window > Package Manager.
- Click the
+button in the top left → Add package from git URL.... - Enter the URL below and click Add.
Editing manifest.json directly
Add to dependencies in Packages/manifest.json.
Info
If you need encryption, also install the DataProtector package. When DataProtector is present, the USE_ENCRYPT symbol is defined automatically, enabling the UseEncryption() and UseVersion() methods. See Usage › Encryption & Versioning for details.
Quick start
1. Define the data class to save
Add the [MemoryPackable] attribute and the partial keyword to the class you want to serialize with MemoryPack.
2. Create a QuickSave instance
Create an instance with the Builder pattern. The save directory (persistentDataPath/quicksave/) is prepared at creation time.