Runtime Data
Save & Restore Runtime State
Save persistent Blackboard state to a Flow Core slot and restore it through the supported runtime load path.
- Audience
- Gameplay designers and developers
- Time
- 15 minutes
- Requires
- A Blackboard with one value that can change in Play Mode
- Modules
- Flow Core
On this page
Goal
Enable persistence for one Blackboard, change a value in Play Mode, save a slot, change the value again, and load the slot to restore the captured state.
When To Use This
Use the Flow Core save channel when Blackboard data or supported persistence handlers must survive beyond the current scene state or play session. Keep the first verification small: one persistent Blackboard, one changed value, and one explicit save slot.
This workflow is separate from an in-memory Flow Stats Snapshot. A Stats Snapshot restores one FlowStats owner’s runtime data; the Flow Core save channel captures eligible persistent Blackboards and writes the runtime cache to a slot.
Prerequisites
- A
Blackboard,SceneBlackboard, orGlobalBlackboardwith Persistence enabled. - One serializable key whose value can be changed and observed in Play Mode.
- A reliable UI action, Flow Graph path, or supported runtime call for Save and Load.
- A test slot that can be overwritten without affecting player data.
Where To Find It
Select the Blackboard owner and use its Persistence section to enable saving and review its GUID and optional Group. Graph save and load operations are under Flow/SaveLoad. Runtime integrations can use FlowCore.Save, FlowCore.Load, or FlowCore.LoadAsync.
Workflow
1. Choose the persistent owner
Enable Persistence on the Blackboard that owns the value. Keep its generated GUID stable. Use an optional Group only when several Blackboard snapshots should share the same reset boundary; a Group does not create a separate slot.
2. Decide what belongs in the snapshot
Blackboard buckets store supported typed values. Add persistence handlers only for component state that has a supported handler and belongs in the same save responsibility. Unity asset references that use Flow Core’s asset persistence path must be resolvable through Addressables.
3. Save a known state
Enter Play Mode and set the test value to an unmistakable state. Run Save for the test slot during a stable, low-interaction moment. Saving captures currently loaded persistent Blackboard state before writing the slot.
4. Change the live value
After Save completes, change the same Blackboard value again. Confirm the live value is visibly different from the saved value. This proves that a later restore is not merely showing unchanged scene data.
5. Load the slot
Run Load for the same slot. Use FlowCore.LoadAsync for user-facing flows that need progress feedback while scenes or deferred restore work completes. If scene reload is enabled, wait for the load result before checking restored state.
What Changes
Save refreshes the current persistent Blackboard cache and writes that cache to the selected slot. Load may restore saved scenes first, then applies Blackboard bucket data and matching persistence handlers after the scene restore barrier completes.
Load restores supported captured state. It does not resume an arbitrary graph at an exact Instruction, reconstruct transient physics contacts, or guarantee continuation from a high-churn gameplay moment.
Verify the Result
Common Mistakes
| Symptom | Check |
|---|---|
| The value keeps its scene default | Confirm Persistence is enabled and the Blackboard GUID did not change. |
| Load succeeds but an asset reference is missing | Make the persisted asset Addressable or use a supported non-asset value path. |
| A component does not restore | Add the appropriate persistence handler and keep its Instance ID stable. |
| The wrong slot is loaded | Use the same slot identifier for Save and Load. |
| Additive scenes load twice | Do not let both save-file restore and startup logic own the same additive-scene load. |
| Logic resumes at an unexpected point | Save during a stable handoff instead of expecting exact Instruction-level continuation. |