No-code save component
The Persistence Save component, every Inspector section, the Beginner and Advanced views, and the triggers that decide when a save happens.
What the component is#
NexusForge/Persistence Save captures the GameObjects, components and PersistableScriptableObject assets you assign, and saves them through the same pipeline the code API uses. It is a client of SaveSlotService, not a second engine: a save written by the component is a save the explicit API can load, and the other way round.
The Inspector, section by section#
| Section | What it decides | Default |
|---|---|---|
| General | Persistence enabled, target slot, save label, schema version, identity | on, default, object name, 1 |
| Data | Which objects are captured, and the capture depth limit | empty until you assign sources |
| Triggers | Disable/destroy, pause and background, scene change, autosave | disable and pause on |
| Autosave | Debounce, longest unsaved, minimum gap | 2 s, 60 s, 10 s |
| Security | Integrity, encryption, compression, backups | read from the settings asset |
| Validation | Every check, with what/why/fix | always visible, in both modes |
| Code | Generated code for this configuration, with Copy | public APIs only |
Beginner and Advanced are one toggle#
Beginner shows the decisions a first-time user must make. Advanced adds the numbers, the migration interaction and a capture preview. Validation is shown in both, because hiding an error behind a "simple" view is how a package loses trust.
Triggers: when a save happens#
| Trigger | Fires on | Notes |
|---|---|---|
| Disable / destroy | OnDisable, OnDestroy | On by default; covers scene unload and object destruction. |
| Pause / background | OnApplicationPause, focus loss | On by default; the one mobile players depend on. |
| Scene change | A new scene loading | Capture and save are separate steps, so nothing is lost to a load. |
| Autosave | MarkDirty plus the debounce | Off until you enable it; see Autosave. |
| Manual | Your code calling SaveNow() | One line, same pipeline. |
Unity callbacks cannot await and the object may not exist a frame later, so those triggers capture synchronously and save asynchronously: the snapshot is taken while the object is alive, and the write happens on the pipeline's own terms.
What the component will not do#
- It will not scan your scene for objects to save. It only ever looks at the objects you assigned — a project-wide identity scan is an Editor operation, not a runtime one.
- It will not bypass a validator, a migration or an integrity check to make configuration easier.
- It will not guess at your schema. The version you set is the version written, and a missing migration step is reported by the existing migration checks.
Next#
- GameObjects and components — what a captured object actually contains.
- Autosave — the numbers behind the debounce.
- Generated code — the code the Inspector offers you, and what it deliberately omits.
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