Easy Chapter Generator
EnglishEspañol

Run a reusable one-shot scene action

Detonator executes a delayed burst of transport actions, object activation/deactivation, material replacement, and a final UnityEvent. It can be fired explicitly or by a matching trigger collider. It is classified as an Action because it does not own an Ordered Objective and does not automatically complete progression unless one of its configured transport adapters or events deliberately does so.

Use it to coordinate a destruction effect, reveal a changed environment, or stage several scene reactions from one signal. Do not use it as a general timeline or reversible state machine: its built-in reset cancels a pending delay and rearms the one-shot flag but does not undo already executed scene changes.

Configuration fields

AreaFieldBehavior
TimingStart DelayUnscaled delay before actions
Automatic TriggerTrigger AutomaticallyAllows enter/stay to call Detonate
FilterRequired ObjectExact root and children take priority
FilterRequired Tag / Accepted LayersUsed only without an exact object; invalid tags fail safely
TransportTransport ActionsExecuted first with current Chapter context
Scene ObjectsActivate / DeactivateApplies active state to non-null entries
MaterialsTarget, Replacement, Include ChildrenUses renderer material instances
EventOn DetonatedInvoked after configured actions

One-shot order and public calls

  1. Detonate()Rejects a second call, marks IsDetonated immediately, and starts the coroutine.
  2. DelayWaits with unscaled time or one frame when delay is zero.
  3. TransportExecutes each non-null ObjectTransportAction with current Chapter context.
  4. Scene changesActivates, deactivates, and applies material replacements.
  5. NotificationInvokes On Detonated and clears the pending coroutine reference.

ResetDetonator() stops a pending coroutine and sets IsDetonated false. If actions already ran, it does not restore transforms, object active states, or materials.

Example: reveal a damaged room state

  1. 1
    Add a trigger collider and Detonator to the activation zone. Enable Trigger Automatically and assign the Player root.
  2. 2
    Add an intact prop to Deactivate On Detonation and a damaged prop plus original particle effect to Activate On Detonation.
  3. 3
    Add material replacements only for renderers that should remain active. Bind On Detonated to the project audio or camera-shake service.
  4. 4
    Test a repeated stay callback: the sequence must run once. Reset before entry and confirm it can fire again.

Automatic trigger never fires

Check Trigger Automatically, Is Trigger, Rigidbody rules, exact object or layer/tag filters.

Invalid tag logs no exception

This is deliberate: undefined tags are caught and treated as no match.

Reset does not restore the room

Restoration is project-owned. Pair ResetDetonator with explicit inverse actions or reload a known scene state.