๐งฐ Zion Tools
Unity Editor Asset Tools
Zion Scene Backup โ Documentation
Quick Start
- Import the package.
- Open
Edit > Project Settings > Zion > Scene Backup. - Confirm the default settings are sensible for your project (5-minute timer, backup on Play, backup on focus loss, retain last 20 per scene / 7 days).
- Continue working. Backups are silent.
Concepts
Triggers
Four independent triggers can fire a backup pass:
| Trigger | Default | When it fires |
|---|---|---|
| Interval | On (5 min) | Every N minutes while the editor is idle and not in Play Mode. |
| On Play | On | The instant the user enters Play Mode. |
| On Compile | Off | After every successful script compile. Useful but noisy. |
| On Focus Lost | On | When the editor window loses focus (e.g. you alt-tab away). |
Each trigger calls BackupAllOpenScenes, which iterates every loaded scene with a saved path and writes a copy via EditorSceneManager.SaveScene(..., saveAsCopy: true). Untitled scenes are skipped โ there's nothing to back up to yet.
Storage
Backups live under one of three roots:
- Library folder (default):
<ProjectRoot>/Library/SceneBackups/. Already gitignored by Unity. - Project root:
<ProjectRoot>/SceneBackups/. Tracked by VCS unless you ignore it. - Custom: any absolute or project-relative path you choose.
Filenames follow {SceneName}_{yyyy-MM-dd_HH-mm-ss}.unity so they sort chronologically. Each backup has a .meta.json sidecar recording the trigger reason and source path.
Retention
The pruner runs after each successful backup and keeps a file if either of these is true:
- It is among the most recent N backups for its scene (default: 20).
- It is younger than the configured age cap (default: 7 days).
A backup that fails both checks is deleted along with its sidecar. The OR-policy is intentional โ a long quiet period shouldn't wipe history.
Crash recovery
On startup, if the previous session didn't run its EditorApplication.quitting handler (crash, kill, power loss), the most recent backup of the previously open scene(s) is offered for one-click restore.
Restore actions
From Window > Zion > Scene Backups:
- Restore (overwrite) โ replaces the original scene file with the backup. A safety-net "pre-restore" backup is taken first.
- Restore as copy โ opens the backup additively so you can cherry-pick edits.
- Reveal โ opens the file in your OS file browser.
- Delete โ removes the backup and its sidecar.
FAQ
Does this slow down my editor?
No. Backups run on save-as-copy, which is fast even on large scenes, and the pruner only touches files for the affected scene. Set "Disable In Play Mode" if you want absolute zero overhead during gameplay testing.
Will backups end up in my build?
No. The package is editor-only โ the assembly is excluded from runtime โ and the default Library location is never included in builds.
Will Git see thousands of backup files?
Not with the default settings. Library/ is in Unity's default .gitignore. If you switch to the Project Root location, add SceneBackups/ to your ignore file or use it deliberately for tracked history.
Does it back up prefabs / ScriptableObjects?
No. v1 is scene-only by design. Prefab and asset history are out of scope.