Installation

Installing PersistKit into a Unity 6.3 project, and the one optional step that turns on asset references.

PersistKit NexusForge Persistence 1.0.0 Updated

Requirements#

Unity6.3 (6000.3) or newer
Render pipelinenone: built-in, URP and HDRP all work
DependenciesUnity's own packages only — Unity UI (com.unity.ugui), and the Unity Test Framework (com.unity.test-framework) for the package's own tests. No third-party code, and no cloud SDK
ScriptingIL2CPP and Mono. The runtime does no work off the main thread and uses no reflection

Installing#

From the Package Manager. Window → Package Manager → + → Add package from disk… (or *Add package from git URL…*), then choose the PersistKit folder or paste the repository URL. The package is called com.persistkit.core.

Or by hand. Copy the com.persistkit.core folder into your project's Packages folder. Unity picks it up on the next focus; there is nothing else to configure.

Checking it worked#

Open any script and write:

csharp
using UnityEngine;
using PersistKit;

public class TryIt : MonoBehaviour
{
    private void Start()
    {
        Persist.Save(class="tok-str">"hello", 1);
        Debug.Log(Persist.Load(class="tok-str">"hello", 0));   // 1
    }
}

Press Play, then look at Tools → PersistKit → Open Save Folder. A save.json file is there. That file is readable text on purpose: when something goes wrong, being able to open it is worth more than hiding it.

The optional step: asset references#

Saving a reference to an asset — a Sprite, a ScriptableObject, a prefab — needs one table that says which short key stands for which asset, because a save file cannot hold a Unity object. Create it with Tools → PersistKit → Asset Registry. A game that never saves an asset reference never needs it.

Next#

Something wrong on this page? Every page here describes behaviour that is checked in the repository. If a page and the package disagree, the package wins.

Report a documentation problem · Error codes · Platforms and limitations