Save and persistence
Saving and restoring interaction state.
Interaction Engine provides a built-in SaveGame class and Blueprint library for capturing interaction state. The recommended workflow is world-level: store all registered interactables, store all active foliage proxy state, write the SaveGame to disk, then restore both systems on the authority after the level has loaded.
How it works
The save system revolves around UInteractionEngineSaveGame, which extends Unreal's USaveGame.
It stores interaction data in three maps:
| SaveGame field | Used by | Notes |
|---|---|---|
InteractableSnapshots |
Normal interactable actors/components | Keyed by stable actor path for the bulk workflow, or by your custom SaveKey for the individual workflow. |
WorldFoliageProxySnapshots |
Recommended foliage save/load workflow | Keyed by a stable world identity built from source mesh, source component path, instance index, and transform. |
FoliageProxySnapshots |
Legacy / per-interactor foliage workflow | Kept for compatibility. Prefer Store All Foliage Proxy Snapshots for multiplayer and most projects. |
The plugin does not save automatically on gameplay events. You call the store functions when your project decides to save, and you call the restore functions after the relevant level actors, subsystems, and foliage components are initialized.
The interactable registry
UInteractableRegistrySubsystem is a world subsystem that automatically maintains a live list of every loaded
UInteractableComponent that has bRegisterForSave enabled. Components self-register on
BeginPlay and self-unregister on EndPlay.
This keeps bulk save/load compatible with Level Streaming and World Partition. Only currently loaded interactables are visited during a bulk store or restore call. Previously saved entries for unloaded cells remain in the SaveGame object.
Access the subsystem in Blueprint via Get World Subsystem with class InteractableRegistrySubsystem,
then call Get All Interactables if you need a custom manual iteration flow.
bRegisterForSave
bRegisterForSave on UInteractableComponent controls whether the component participates in the
automatic registry used by Store All Interactable Snapshots and Restore All Interactable Snapshots.
Leave it enabled for placed gameplay interactables. Disable it for decorative objects, temporary runtime actors, or components
that your own save system handles manually.
Recommended save workflow
InteractionEngineSaveGame object, or load an existing one from disk if you are updating an existing save slot.
bRegisterForSave = true.
AFoliageProxyActor state into WorldFoliageProxySnapshots and also preserves runtime world-state foliage snapshots.
Recommended load workflow
InteractionEngineSaveGame. If no save exists,
skip restore and let the world initialize from defaults.
Apply State Snapshot is authority-only. In multiplayer,
the server should restore interaction state and let replication update clients.
World-level foliage snapshots
Store All Foliage Proxy Snapshots is the recommended foliage persistence node. It captures foliage proxy state into
WorldFoliageProxySnapshots, not into a player/interactor-specific collection. This is the correct model for multiplayer sessions,
shared worlds, and ordinary singleplayer saves.
During restore, the system handles several cases:
AFoliageProxyActor instances receive their saved state immediately.
Legacy per-interactor foliage workflow
Store Foliage Snapshots and Restore Foliage Snapshots still exist for compatibility. They save a collection of
active foliage proxy snapshots associated with one InteractorComponent under a manual SaveKey.
Use this only when your game intentionally needs per-player or per-interactor foliage state. For normal world persistence, especially in multiplayer, prefer the world-level Store All Foliage Proxy Snapshots and Restore All Foliage Proxy Snapshots nodes.
Individual interactable workflow
The individual Store Interactable Snapshot and Restore Interactable Snapshot nodes are useful when you need
custom save keys or when an interactable is spawned by your own gameplay systems. The SaveKey must be stable and unique.
If two interactables use the same key, the later store call overwrites the earlier one.
Blueprint node reference
| Node | Inputs | Output | Notes |
|---|---|---|---|
| Store All Interactable Snapshots | World Context, SaveGame | — | Saves every loaded interactable with bRegisterForSave = true. Recommended for normal interactable actors. |
| Restore All Interactable Snapshots | World Context, SaveGame | — | Restores every currently loaded interactable that has a matching saved entry. Authority-only through the component apply path. |
| Store All Foliage Proxy Snapshots | World Context, SaveGame | — | Recommended foliage persistence path. Captures live foliage proxy state into WorldFoliageProxySnapshots. |
| Restore All Foliage Proxy Snapshots | World Context, SaveGame | — | Restores foliage proxy state from the world-level snapshot map. Updates live proxies, materializes missing proxies when possible, and queues unresolved snapshots. |
| Store Interactable Snapshot | SaveGame, SaveKey, Interactable | — | Captures one interactable component under a custom key. Useful for runtime-spawned actors with your own stable IDs. |
| Restore Interactable Snapshot | SaveGame, SaveKey, Interactable | Boolean | Applies one saved interactable snapshot. Returns false when the key is not present. |
| Store Foliage Snapshots | SaveGame, SaveKey, Interactor | — | Legacy / per-interactor foliage path. Prefer Store All Foliage Proxy Snapshots for shared world persistence. |
| Restore Foliage Snapshots | SaveGame, SaveKey, Interactor | Boolean | Legacy / per-interactor foliage restore. Returns whether at least one proxy snapshot was restored. |
Component-level snapshot methods
These methods are available directly on components when you need lower-level control than the SaveGame library nodes provide.
| Method | Component | Notes |
|---|---|---|
Capture State Snapshot |
InteractableComponent | Returns an FInteractableComponentStateSnapshot with current interactable and slot state. |
Apply State Snapshot |
InteractableComponent | Applies a previously captured snapshot. Resets slots to defaults first, then applies saved values. Authority-only. |
Capture Active Foliage Proxy Snapshots |
InteractorComponent | Returns foliage proxy snapshots for active proxies tracked by that interactor. Mostly useful for custom/legacy workflows. |
Restore Foliage Proxy Snapshots |
InteractorComponent | Restores an array of foliage proxy snapshots through the interactor. Mostly useful for custom/legacy workflows. |
Restore Foliage Proxy Snapshot |
InteractorComponent | Attempts to restore a single foliage proxy snapshot and returns whether it succeeded. |
What gets saved for interactables
FInteractableComponentStateSnapshot captures the component-level and slot-level state that Interaction Engine owns.
| Saved data | Notes |
|---|---|
| Save version | Snapshot schema version used for compatibility. |
| Persistent interactable GUID | Stored as part of the snapshot identity/state data. |
| Master interactable state | Whether the interactable component is enabled as a whole. |
| Respawn state | Whether a respawn is pending and the remaining respawn time. |
| Slot enabled/blocked state | Per-slot enabled flag, blocked flag, and blocked reason. |
| Hold progress | Current normalized hold progress. |
| Hit count and health | Current hit count and remaining health for hit/damage-based interactions. |
| Toggle active state | Whether a toggle slot is currently active. |
| Cooldown state | Whether each slot is on cooldown and how much time remains. |
| Custom data | The component's custom data map is serialized into key/value entries and restored automatically. |
What gets saved for foliage proxies
FFoliageProxyStateSnapshot stores both the source foliage identity and the proxy interactable state.
| Saved data | Notes |
|---|---|
| Stable instance ID | Identifies the foliage instance across save/load when possible. |
| Source mesh | Soft reference to the foliage source mesh. |
| Source instance transform | World transform used to match or reconstruct the proxy/source relationship. |
| Source instance index | Original instance index when available. |
| Source component path | Stable path for the source foliage component, normalized for PIE where needed. |
| Source/proxy visibility | Whether the original foliage instance and spawned proxy actor were hidden at save time. |
| Live proxy flag | bHadLiveProxy distinguishes live proxy state from source-only/tombstone state. |
| Deferred regrowth state | Whether regrowth was pending and the remaining timer value. |
| Interactable state | The proxy's internal InteractableComponent snapshot, including slot health/progress/cooldowns/custom data. |
What does not get saved
- General actor transform for normal interactables. Level-placed interactables should already exist at load time.
- Arbitrary Blueprint variables outside Interaction Engine's snapshot structs.
- Widget visual state, animations, or UI-only data.
- Transient interactor state such as focus target, trace results, manual target selection, or current input device.
- In-progress input transactions. Save stable gameplay state, not a held button/mash transaction currently being evaluated.
Limitations and practical rules
Apply State Snapshot resets slot runtime state to defaults before applying saved data. Runtime data outside the snapshot is not preserved.
Debugging save/load
Use these console variables when validating persistence flows:
| CVar | Use |
|---|---|
ie.Debug.SaveLoad 1 | Logs snapshot store/restore behavior. |
ie.Debug.Foliage.EventTrace 1 | Useful when validating foliage proxy lifecycle around save/load. |
ie.Debug.FoliageProxy 1 | Logs foliage proxy creation, restoration, visibility, and lifecycle details. |
ie.Debug.Net 1 | Useful in multiplayer when checking whether save/restore was triggered on the correct machine. |