Easy Chapter Generator
EnglishEspañol

Three operations with different scope

OperationChangesDoes not do
Objective.ResetObjectiveLocal scene detector stateDoes not change ordered state or persisted progress
Chapter fresh startDeletes known progress for that Chapter, resets rows and linked physical Objectives, starts a chosen/first rowDoes not clear other Chapters or named states
ChapterManager.ClearProgressKnown Chapter, Objective, named state, and handoff records for the current scope/profileDoes not delete arbitrary PlayerPrefs or orphaned removed-content keys
Chapter.TryStepBackCompletes current row as a special step, moves one index back, resets previous row and linked detectorIs not a general undo or history stack

TryStepBack exact contract

The Chapter must be Active, the current index must be at least one, and the supplied ID must match the current Ordered Objective exactly. The method stops pending start work, raises ObjectiveCompleted for the current index, completes the current record with step-back semantics, decrements the index, resets the previous record and its matching scene Objective component, then starts that position again.

Completion actions for the current row run, but the objective success sound is suppressed. Because this is a progression operation, it can persist the current row's terminal state before returning to the previous one. Design a Back button with those effects in mind.

Custom components must reset all transient state

  • Call base.ResetObjective() to clear local accepted completion.
  • Stop coroutines and timers that could emit a late request.
  • Clear counters, branch flags, cached colliders, and one-shot feedback guards.
  • Restore project-owned objects separately when they were destroyed, moved, pooled, or visually changed.
  • Do not invoke historical completion events during reset.

Included components follow this rule where they own transient data. DestructionObjective cannot resurrect destroyed content; ObjectPlacementObjective clears occupancy but cannot reposition props; ObjectTransportAction keeps no inverse transform.

Test reset and back independently

  1. 1
    Complete Objective 01 and make Objective 02 Active.
  2. 2
    Call TryStepBack with the exact Objective 02 ID. It must return true and Objective 01 must become Active again.
  3. 3
    Repeat at Objective 01: it must return false because no previous position exists.
  4. 4
    Reset a scene detector only. Confirm ordered progress does not move.
  5. 5
    Start the Chapter fresh and confirm its own persisted rows reset while another Chapter's completion remains.
  6. 6
    Clear Progress and verify all currently known rows and boolean states in the profile return to defaults.