Easy Chapter Generator
EnglishEspañol

Match objects to destinations

ObjectPlacementObjective completes when every configured movable object occupies its corresponding destination trigger. Each PlacementTarget pairs an exact GameObject—or a fallback exact name—with a destination GameObject. At Start, the component finds an available PlacementTrigger on each destination or adds one and configures it.

Use it for sockets, puzzle pieces, tools on stations, or physical props placed in marked areas. Do not use it when “placed” depends on rotation tolerance, inventory state, snapping rules, or a vendor-specific grab state that cannot be represented by trigger occupancy; signal a custom Objective from that authoritative system instead.

Placement target fields

FieldPurposeRequirement
Movable ObjectExact accepted root; child colliders also matchPreferred over name matching
Movable Object NameFallback exact collider nameUsed only when no object reference is assigned
DestinationGameObject that owns the trigger collider/helperMust exist; collider should have Is Trigger enabled
Placement TriggerRuntime helper referenceAssigned automatically and hidden from normal authoring
On All Objects PlacedFeedback immediately before completion requestInvoked once when all occupancy flags are true

Runtime configuration and reset

Each frame, a nonempty target list is considered complete only when every target has a configured trigger and every trigger reports IsTriggered. The component invokes On All Objects Placed once, then requests completion if Objective ID is non-empty. If the Chapter rejects that request, the feedback flag remains set; correct linking before play rather than relying on a second feedback invocation.

ResetObjective() clears the base completion flag, the one-shot feedback flag, and every configured trigger's occupancy state. It does not move objects back to their starting transforms. Add project-owned reset or respawn work to the Chapter start edge when the puzzle must be replayable.

Example: place battery and fuse

  1. 1
    Create two destination GameObjects, each with a trigger collider sized to its physical socket.
  2. 2
    Add ObjectPlacementObjective to the linked Objective container and create two Placement Targets.
  3. 3
    Assign the battery and its socket to the first entry, then the fuse and its socket to the second.
  4. 4
    Select Play in Unity's top toolbar and place only one object. The row must remain Active. Place the second; On All Objects Placed and accepted completion should run once.
  5. 5
    Reset, reposition both props through project code, and confirm both trigger states are false before replay.

Troubleshooting

Destination never reports occupied

Check Is Trigger, the Rigidbody/Collider collision rules, and whether the collider belongs to the assigned object or one of its children.

Two targets share one destination

The component searches for a trigger with no owner or the same owner. Use separate destination helpers when each socket must accept a different target.

Name fallback matches nothing

The fallback compares the collider GameObject name exactly. Prefer the object reference, especially for instantiated clones.

External placement system owns detection

Enable managed external behavior on the PlacementTrigger and call SetTriggered from the authoritative integration.