Skip to content

03 — Snapshots & Time Control

Goal: Teach how to save/restore status state and control time flow using the Status system.


🎓 What This Scene Teaches

  • Snapshots: capture and restore active effects (ID, duration, remaining).
  • Time modes: Scaled, Unscaled, Paused, Custom.
  • Custom time source: freeze or scale time arbitrarily.
  • Using StatusRegistry to rebuild effects during restore.
  • Understanding how stacking rules may affect restore behaviour (e.g. Replace/Refresh collapsing instances).

⚠️ Authority Note This scene does not demonstrate authority gating. It focuses on single-player snapshot and time control behaviour only.


🧩 How to Use

  1. Apply sample statuses (Poison, Haste, etc.).
  2. Click Capture Snapshot — see the list of active effects.
  3. Click Clear All, then Restore Snapshot — effects return with the same remaining times.
  4. Switch Time Mode:

  5. Scaled: respects Time.timeScale.

  6. Unscaled: ignores slow-motion.
  7. Paused: freezes all ticking.
  8. Custom: use the slider to scale delta manually.

⚠️ Important: Snapshot Scope

Snapshots in this scene only capture Status Effect state.

They do not capture or restore:

  • Health values
  • Position or transforms
  • Other gameplay systems

This means:

  • Damage-over-time effects (like poison) will continue affecting Health after a snapshot is captured
  • Restoring a snapshot will not rewind Health
  • It will only restore the remaining lifetime of the Status Effects

This is intentional.

In a real save system, you would snapshot Status + Health + other systems separately, then restore them together.


💡 Key Takeaway

This scene demonstrates how to:

  • Capture and restore status state only using lightweight snapshots.
  • Control status ticking independently of global Unity time.
  • Implement pause systems without relying on Time.timeScale = 0.

Snapshots restore status state, not full gameplay state or exact instance structure — stacking rules may affect how restored effects combine.


Panel: StatusSnapshotsTimePanel Scene Path: Assets/RevFramework/Runtime/Systems/StatusEffects/Samples/Scenes/05_SnapshotsTime/