Installation
Add NexusForge Persistence to a Unity project, reference the assemblies explicitly, and verify the install with the smoke test.
Requirements#
| Requirement | Value | Notes |
|---|---|---|
| Unity | 6000.6 | Developed and verified on 6000.6.0f1. Other versions are Not verified. |
| Runtime dependency | com.unity.nuget.newtonsoft-json | Declared in package.json, so the Package Manager resolves it for you. |
| Assembly references | NexusForge.Persistence.Core (+ .Unity, .Serializers.Newtonsoft) | The assemblies are deliberately not auto-referenced; see below. |
| .NET API level | .NET Standard 2.1 | The framework uses Span<T>, ReadOnlyMemory<byte> and the platform's own cryptography. |
Install#
- Copy
com.nexusforge.persistenceinto your project'sPackages/folder, or use Window → Package Manager → + → Add package from disk… and selectpackage.json. - Unity imports the package and resolves
com.unity.nuget.newtonsoft-jsonautomatically.
That is the whole installation. There is no installer, no scene object to drop in, and nothing is initialised until your code asks for it.
Reference the assemblies from your code#
The package's assemblies set autoReferenced: false, so Assembly-CSharp cannot see them by accident. Add an assembly definition to your game's scripts folder and reference:
NexusForge.Persistence.Core— the engine-free framework (required);NexusForge.Persistence.Unity— the Unity adapters and theNexusForgePersistencefacade;NexusForge.Persistence.Serializers.Newtonsoft— the JSON serializer.
{
"name": "MyGame.Runtime",
"references": [
"NexusForge.Persistence.Core",
"NexusForge.Persistence.Unity",
"NexusForge.Persistence.Serializers.Newtonsoft"
]
}Verify the installation#
- Open NexusForge → Persistence → Setup.
- Press Create settings asset, choose a location, then press Apply to the settings asset with the Minimal preset.
- Press Run smoke test: it writes and reads a small save through the real pipeline and reports the bytes, the path and the time.
- Press Validate configuration. A clean install reports no errors; warnings are things to decide about, not failures.
If the smoke test fails, Troubleshooting lists the causes in the order they are usually met.
Import the samples (optional, recommended)#
Package Manager → NexusForge Persistence → Samples → Import for any of:
| Sample | Shows |
|---|---|
01_BasicSaveLoad | Save, load, autosave, flush on pause |
02_CloudSync | A provider, an offline queue, a preserved conflict |
03_MigrationAndVersioning | Schema 1 → 2, and unknown members preserved |
04_PersistentObjectsAndCheckpoints | Stable ids and rotating recovery points |
Each sample has its own assembly definition, so it compiles cleanly in a project of any size and can be deleted without leaving dangling references. They are described on the Samples page.
What installation does not do#
- It does not create any folder, save, key or service account.
- It does not touch your Player Settings, scripting backend or scenes.
- It does not write anything outside
Application.persistentDataPathwhen your game saves. The Editor's storage probe confines itself to a_probedirectory that it deletes afterwards.
Uninstalling#
Remove the package and your settings asset. Two things survive on purpose, because deleting player data is never an installer's job:
- the save folder under
Application.persistentDataPath, which you can delete yourself; - any
PersistenceSettingsAssetyou created, which is an ordinary project file.
Next#
- 5-minute quick start — the shortest path to a working save.
- Your first save — the same thing with your own model.
- Configuration reference — what every setting costs.
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 · Frequently asked questions · Troubleshooting