Installation

Add NexusForge Persistence to a Unity project, reference the assemblies explicitly, and verify the install with the smoke test.

NexusForge Persistence NexusForge Persistence 0.2.0 Updated

Requirements#

RequirementValueNotes
Unity6000.6Developed and verified on 6000.6.0f1. Other versions are Not verified.
Runtime dependencycom.unity.nuget.newtonsoft-jsonDeclared in package.json, so the Package Manager resolves it for you.
Assembly referencesNexusForge.Persistence.Core (+ .Unity, .Serializers.Newtonsoft)The assemblies are deliberately not auto-referenced; see below.
.NET API level.NET Standard 2.1The framework uses Span<T>, ReadOnlyMemory<byte> and the platform's own cryptography.

Install#

  1. Copy com.nexusforge.persistence into your project's Packages/ folder, or use Window → Package Manager → + → Add package from disk… and select package.json.
  2. Unity imports the package and resolves com.unity.nuget.newtonsoft-json automatically.

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 the NexusForgePersistence facade;
  • NexusForge.Persistence.Serializers.Newtonsoft — the JSON serializer.
json
{
  "name": "MyGame.Runtime",
  "references": [
    "NexusForge.Persistence.Core",
    "NexusForge.Persistence.Unity",
    "NexusForge.Persistence.Serializers.Newtonsoft"
  ]
}

Verify the installation#

  1. Open NexusForge → Persistence → Setup.
  2. Press Create settings asset, choose a location, then press Apply to the settings asset with the Minimal preset.
  3. Press Run smoke test: it writes and reads a small save through the real pipeline and reports the bytes, the path and the time.
  4. 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.

Package Manager → NexusForge Persistence → Samples → Import for any of:

SampleShows
01_BasicSaveLoadSave, load, autosave, flush on pause
02_CloudSyncA provider, an offline queue, a preserved conflict
03_MigrationAndVersioningSchema 1 → 2, and unknown members preserved
04_PersistentObjectsAndCheckpointsStable 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.persistentDataPath when your game saves. The Editor's storage probe confines itself to a _probe directory 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 PersistenceSettingsAsset you created, which is an ordinary project file.

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 · Frequently asked questions · Troubleshooting