Easy Chapter Generator
EnglishEspañol

Move through a bounded integration action

ObjectTransportAction is a serializable action used by Ordered Objective start/completion lists and by Detonator. It supports immediate transform changes plus adapter-based path or NPC routing. The Core never references a specific pathfinding or AI package.

Use Teleport or RotationOnly for deterministic immediate changes. Use PathMovement or NpcRoute only after the project supplies the corresponding public adapter. This action starts movement; the adapter remains responsible for duration, cancellation, collision, animation, and arrival behavior.

Modes and conditional fields

ModeRequired fieldsResult
TeleportSubject, DestinationCopies position and rotation immediately
RotationOnlySubject, DestinationCopies rotation only
PathMovementSubject, Path Source; IPathMovementAdapter on SubjectCalls StartMovement(subject, pathSource)
NpcRouteNPC Adapter implementing INpcRouteAdapter, Path SourceCalls StartRoute with nearby-player flag, optional current ID, and clamped speed

Developer Title labels the action for authors. Complete Current Objective does not complete Core directly; in NpcRoute mode it passes the current Objective ID to the external adapter so that integration may complete it when its route truly ends.

Execution contract and warnings

Execute(Chapter chapter = null) dispatches exactly one mode. Missing Subject or Destination in transform modes logs a warning. PathMovement searches MonoBehaviours on the Subject for the first IPathMovementAdapter; missing Subject, Path Source, or adapter warns. NpcRoute requires the assigned MonoBehaviour to implement INpcRouteAdapter and also requires a Path Source.

Invalid references do not advance or roll back the Ordered Objective automatically. If transport is essential to the task, Validation and a Play Mode acceptance test must prove the adapter call reaches the project system.

Example and reset responsibility

  1. 1
    Add a start transport action to an Ordered Objective and choose Teleport.
  2. 2
    Assign the NPC root as Subject and a scene marker as Destination.
  3. 3
    Select Play in Unity's top toolbar. When start work runs, position and rotation must match the marker before On Objective Start listeners execute.
  4. 4
    For animated movement, implement IPathMovementAdapter on the Subject, switch to PathMovement, and assign a project path component as Path Source.

The action has no Reset method and does not remember previous transforms. Add explicit return movement or scene restoration to the project when a Chapter can restart or step back. See Movement and Route Adapters for compiled integration code.