The target disappeared but the row stays Active
Confirm the object was destroyed, not disabled or pooled, and that the array stores the destroyed root rather than an unaffected parent.
Components
Track a defined set of GameObjects and complete when every required target has been destroyed.
DestructionObjective watches an explicit array of GameObject references. During Update it waits until every configured Unity object compares as null, then requests completion once through the base Objective contract. It is suitable for destructible targets that are genuinely removed with Object.Destroy.
Do not use it for pooled targets that are merely disabled, hidden, moved, or returned to an object pool; those references remain non-null. Let the pool or combat system emit a completion signal, or create a custom Objective that understands its alive-state contract.
| Field | Requirement | Runtime meaning |
|---|---|---|
| Objective Link | Link to the intended active row | Determines which exact completion request can succeed |
| Objects To Destroy | At least one non-null target | All entries must become Unity-null |
| On Completed | Optional | Runs only after the Chapter accepts completion |
An empty or null array never completes. A null entry inside a nonempty array is already considered destroyed, so assign every target deliberately before the run. Children are not implied: add each independent object that must be destroyed or track a common root that your gameplay actually destroys.
The component performs a short linear scan each frame until it completes. Once the base IsCompleted flag is true, polling stops. The inherited Reset clears that flag, but it cannot recreate destroyed GameObjects or restore their health, materials, colliders, or particle systems. Your project must respawn or reset targets before reusing the Objective.
For a small fixed target set this polling cost is negligible. For hundreds of pooled enemies, prefer an event-driven project counter and call the Chapter when the authoritative count reaches zero.
DestructionObjective.Confirm the object was destroyed, not disabled or pooled, and that the array stores the destroyed root rather than an unaffected parent.
Inspect for unassigned or already destroyed array entries before activation.
Reset progression does not reconstruct scene content. Add project-owned respawn logic to the Chapter or Objective start edge.