Easy Chapter Generator
EnglishEspañol

Initialization and startup selection

  1. AwakeThe Manager initializes scope, profile, and progress provider; resolves ChapterAudioPlayer; and establishes the single active instance.
  2. First Start frameKnown Chapter, Objective, boolean, and handoff records are hydrated without invoking historical lifecycle events.
  3. Startup selectionA valid one-use handoff wins, then an Editor-only testing override, then Default Chapter.
  4. ReadyAfter selection has been attempted, the Manager marks itself ready and invokes OnManagerReady.

Scene integrations that need current state should wait for OnManagerReady or handle both cases: the Manager may already be ready when a later object enables, while an early object's OnEnable may run before the Manager's deferred Start work.

Chapter start and resume are different paths

A direct SelectChapter or TrySelectChapter performs a fresh start. It clears persisted progress derivable for that Chapter, resets ordered and linked physical Objective state, sets the Chapter Active, invokes On Chapter Start, and evaluates the requested Editor test Objective or the first row.

Hydrated startup uses resume. Completed and Skipped rows are retained, the requested checkpoint or first nonterminal row is found, the Chapter becomes Active, and its start event runs. A completed Chapter remains completed and does not replay start or completion events. This difference prevents old completions from performing scene actions again.

One Ordered Objective lifecycle

  1. EligibilityRequired true/false states decide participation. A failed check records Skipped and immediately advances.
  2. ActivationThe chosen record becomes Active before its delay and optional external-animation wait.
  3. Start workTransport, activation, deactivation, and On Objective Start run after both gates.
  4. DetectionA component, UnityEvent, or external script submits the exact current Objective ID.
  5. AcceptanceThe Chapter rejects wrong state or identity; accepted completion stops pending start work.
  6. Completion workTyped signal, terminal persistence, scene actions, UnityEvent, transport, and optional success audio run in the documented order.
  7. AdvanceThe next eligible row becomes current or the Chapter completes.

Chapter completion and scene policy

A Chapter completes only when every non-null entry is Completed or Skipped. It writes its completion record, invokes On Chapter Completion, then asks the Manager to play Chapter feedback and apply the configured ChapterCompletionAction. None stops there; the other actions enter the scene-transition lifecycle.

If the sequence reaches its end while a nonterminal row remains, it repairs the current index in memory, warns, and resumes that row rather than declaring false completion. This protects the invariant even if malformed data reaches runtime.

Failure, reset, and step-back

Explicit failure stops the current Objective routine, marks the affected row Failed when appropriate, marks the Chapter Failed, then invokes the typed and serialized failure notifications. No scene, checkpoint, progress, or UI policy is chosen automatically. A fresh Chapter selection resets progress; ClearProgress removes all currently derivable records; component Reset clears only transient detector state. TryStepBack is a deliberate one-position operation, not a history stack.

Use the focused guides for Failure Flow, Progress State Persistence, and Reset and Step Back.