Skip to content

QuickSave

| 🪄Open on GitHub

Provides functionality to save and load data by serializing and deserializing binary files using Cysharp’s MemoryPack.
If you also install Data Protector, you can compress, encrypt, and decrypt the saved data as well. (Docs)


Choose one of the installation methods below.

Note: For the version after # in the GitHub URL, check the latest changes listed in the changelog.

  1. Install the NuGetForUnity package by following its README.
  2. In the editor menu, click NuGet/Manage NuGet Packages and download MemoryPack.
  1. Open Unity Package Manager and click the + button in the upper-left corner.
  2. Select Install package from git URL....
  3. Enter https://github.com/achieveonepark/quick-save.git#1.0.0 and click Install.

Open the manifest.json file in your Unity project’s Packages folder.
Add the following line under dependencies.

"com.achieve.quick-save": "https://github.com/achieveonepark/quick-save.git#1.0.0"

This setup prepares MemoryPack for smooth binary serialization and deserialization inside Unity.

Choose one of the two methods below.

For the version after # in the GitHub URL, check the latest entry in the changelog.

  1. Open UPM and click the + button in the upper-left corner.
  2. Select Install package from git URL....
  3. Enter the package URL and install it.
  1. Open Unity Project/Packages/manifest.json.
  2. Add "com.achieve.quick-save": "https://github.com/achieveonepark/quick-save.git#1.0.0" under dependencies.

This package provides the following features.

QuickSave.Builder | Creates a QuickSave object.
QuickSave.SaveData<T> | Saves data of type T as a binary file under persistentDataPath.
QuickSave.LoadData<T> | Loads data of type T from persistentDataPath.
[MemoryPackable]
public partial class Monster
{
public int HP;
public long Attack;
public long Defense;
}
using Achieve.QuickSave
public class DataMng : MonoBehaviour
{
QuickSave<Monster> data;
void Start()
{
Monster monster = new Monster();
monster.HP = 10000;
monster.Attack = 10000;
monster.Defense = 100000;
data = new QuickSave<Monster>.Builder()
.UseEncryption("ejrjejrtlq3mgfeq") // Available when Data Protector is added.
.UseVersion(55) // Sets the data version.
.Build();
// Save the data.
data.SaveData(monster);
// Load the physically stored data.
var loadMonster = data.LoadData();
}
}

Memory Pack (1.21.1)


link