Easy Chapter Generator
EnglishEspañol

Complete after an explicitly started countdown

TimedObjective accumulates scaled Time.deltaTime, updates an optional TMP label, and requests completion when elapsed time reaches Duration Seconds. The timer is paused by default; authoring the component does not start it automatically. Bind StartTimer() to the Ordered Objective's start event or call it from project code at the intended moment.

Use it for waits and countdowns tied to game time. Do not use it for a deadline that must continue while time scale is zero; create a custom unscaled timer for that rule.

Fields and controls

MemberMeaningBehavior
Duration SecondsTarget elapsed duration, clamped to zero or more in InspectorZero completes on the first running update
Timer TextOptional TMP_Text outputShows remaining time as minutes:seconds
Completed TextText shown when remaining reaches zeroDefaults to Completed
StartTimer()Starts or resumes unless locally completeDoes not reset elapsed time
PauseTimer()Stops accumulationPreserves elapsed time and label
ResetTimer()Pauses and clears elapsed timeRefreshes label to full duration

Public read-only properties expose DurationSeconds, ElapsedSeconds, and IsRunning for UI or diagnostics.

Completion and reset behavior

When the deadline is reached, the component stops itself, calls TryComplete(), then writes the zero/completed label. If the ordered flow rejects completion because the link is early or wrong, the timer remains stopped; correct the activation wiring and link rather than expecting automatic retries.

ResetObjective() clears the inherited completion flag and calls ResetTimer(). It does not start automatically after reset. The Objective start event must start it again on every run.

Example: five-second stabilization

  1. 1
    Create an Ordered Objective named Stabilize the system and set its On Objective Start listener to TimedObjective.StartTimer.
  2. 2
    Set Duration Seconds to 5 and assign a TMP label if visible feedback is required.
  3. 3
    Select Play in Unity's top toolbar. Confirm the label counts down only after the row becomes Active.
  4. 4
    Pause and resume through project controls; elapsed time must be preserved. Reset and confirm the label returns to 0:05 and remains paused.

Timer never moves

No code called StartTimer, or Time.timeScale is zero.

Timer finishes but row remains Active

Inspect Objective Link and whether another row was current when the timer started.

Label is missing

Timer Text is optional and requires the official TextMesh Pro package; completion does not depend on the label.