Build a Seek state first. It proves that the controlled object, navigation provider, destination, and result transitions are connected before adding prediction or cover.

Import and try the demo

Import State Designer and its dependencies before the Movement Pack. For registry installation, the package is com.opsive.statedesigner.addons.movement; version 1.0.0 declares State Designer 1.3.2, Graph Designer 3.1.0, Shared 2.3.0, and Entities 1.3.8 dependencies. Use a compatible installed version of each dependency.

For a classic package, open Samples/Demo.unity within the Movement Pack. For a UPM installation, the examples are stored under Samples~; copy them into Assets before editing or opening the scene. This release does not declare a Package Manager Import sample button.

Enter Play Mode and select Seek, Flee, Pursue, Evade, Follow, Patrol, Move To Cover, or Wander from the sidebar. Restart restores the agent and target. Pause / Resume pauses both sample state machines. Arrow keys or W, A, S, and D switch examples. The live diagnostics show movement progress and the detailed result.

Each example uses an editable State Designer graph. Start from the Seek example when comparing an authored graph with the working sample.

Set up the controlled object

  1. Put a State Machine, NavMesh Agent, and Movement Agent on the controlled GameObject.
  2. In Movement Agent, use NavMesh Movement Provider. Its Agent reference can resolve the NavMesh Agent on that same object when left empty.
  3. Bake navigation data for the agent type and place the object on that data. Configure speed, acceleration, radius, and stopping distance on NavMesh Agent.
  4. Create a destination GameObject at a reachable position.

Navigation Actions can add Movement Agent when Auto Add Movement Agent is enabled. They do not add or bake a working NavMesh Agent or navigation surface. Adding the component explicitly makes provider and stuck-detection settings available before Play Mode.

The controlled Navigation Agent has a State Machine, NavMesh Agent, and Movement Agent with its NavMesh Movement Provider settings visible.

These components belong on the actor. The separate Destination object supplies the goal; it does not need its own Movement Agent.

Create a Seek state

  1. Add an Action State named Move and connect Start to it.
  2. Add Movement Pack / Seek to the state’s Action list.
  3. Keep the Action’s controlled Target GameObject on the agent. Set Destination Source to GameObject and assign the separate destination to Destination GameObject.
  4. Create a Graph variable of type MovementResult, name it MoveResult, and bind the Action’s Result to it.
  5. Use Completion Mode: Arrival for this first example.
  6. Create an Arrived state and a transition from Move. Use a core Condition or a ConditionDelegate that evaluates whether MoveResult equals Succeeded. The pack does not add a Movement Result Comparison Condition. See Results and Transitions for the comparison logic.
  7. Create a recovery transition for the failure result you want to handle, such as Path Invalid or Destination Rejected. See Results and Transitions for grouping terminal failures.

Seek controls Navigation Agent, navigates to the separate Destination GameObject, uses Arrival completion, and writes its result to the Graph variable MoveResult.

The selected Move state’s Seek Action keeps the controlled actor and destination separate. Its Result binding must refer to the same Graph variable that the outgoing transition reads.

In Play Mode, MoveResult becomes Running while the agent moves. On arrival it becomes Succeeded, and the success transition can enter Arrived. A rejected destination finishes the Action with a different result, so it should take the recovery route instead.

Completion and interruption

The Action finishing does not select a successful transition by itself. State Designer uses Finished for both successful and unsuccessful terminal outcomes. Test Result when the destination matters to the next state.

For Follow, Patrol, or Wander that should run indefinitely, choose continuous behavior and let outgoing Conditions decide when to leave. Set a transition’s Evaluation Mode to Continuous when it must interrupt a Running Action. Use On State Finished when the Action must finish before the Conditions are evaluated. See Transition Evaluation and Priority.

Stop On End is enabled by default for navigation movement. Exiting the Action stops and clears its provider path and releases ownership. A traversal request is a special handoff that retains the provider’s pending traversal state.