Component Reference
PathTween
The main component. Moves an object along a path defined by waypoints, with full easing, spline interpolation, rotation tracking, and event support.
Path Data
| Property |
Description |
| Path Definition |
Reference to a PathDefinition ScriptableObject asset. When set, the path is shared across all objects referencing this asset. Leave null to use inline waypoints. |
| Inline Waypoints |
Array of PathPoint structs. Visible only when Path Definition is null. Each waypoint has position, rotation, scale, delay, and per-point easing override. |
Movement
| Property |
Description |
| Closed |
When enabled (inline paths only), the path forms a closed loop connecting the last point back to the first. For PathDefinition assets, set closed on the asset itself. |
| Mode |
Once (single pass), Loop (restart from beginning), PingPong (bounce back and forth) |
| Speed |
Movement speed in world-units per second. Constant velocity across the entire path. |
| Easing |
Global easing curve applied to the movement. See Easing section below for all curve types. |
| Use Custom Curve |
When enabled, replaces the easing dropdown with a Unity AnimationCurve field for fully custom motion. |
| Custom Curve |
The AnimationCurve to use when Use Custom Curve is enabled. Defaults to linear (0→1). |
| Use Spline |
On: Catmull-Rom spline interpolation between waypoints for smooth curves. Off: straight line segments between waypoints. |
Easing Curves
| Category |
Curves |
| Linear |
Linear |
| Quad |
QuadIn, QuadOut, QuadInOut |
| Cubic |
CubicIn, CubicOut, CubicInOut |
| Quart |
QuartIn, QuartOut, QuartInOut |
| Quint |
QuintIn, QuintOut, QuintInOut |
| Sine |
SineIn, SineOut, SineInOut |
| Expo |
ExpoIn, ExpoOut, ExpoInOut |
| Circ |
CircIn, CircOut, CircInOut |
| Elastic |
ElasticIn, ElasticOut, ElasticInOut |
| Back |
BackIn, BackOut, BackInOut |
| Bounce |
BounceIn, BounceOut, BounceInOut |
A custom AnimationCurve can be used instead of any preset curve.
Rotation
| Property |
Description |
| Rotation Mode |
None (keep original rotation throughout), LookAtTarget (rotate to face the next position ahead on the path), FollowTangent (smoothly rotate to follow the spline's tangent direction — spline mode only) |
| Rotation Speed |
Degrees per second for rotation smoothing. Higher = snappier turns, lower = gradual rotation. |
Scale Tween
| Property |
Description |
| Scale Tween |
When enabled, the object's local scale interpolates between per-waypoint scale values along the path. Useful for shrink/grow effects or matching terrain scale changes. |
Events
| Event |
Description |
| OnPathStarted |
Invoked once when Play() is called and movement begins. |
| OnWaypointReached(int) |
Invoked each time the object crosses a waypoint. The int parameter is the waypoint index (0-based). Can be wired to any method that accepts an int. |
| OnPathCompleted |
Invoked when the path is finished in Once mode (progress reaches 1.0). |
| OnLoop |
Invoked on every loop (Loop mode) or every direction change (PingPong mode). |
Public API
| Member |
Type |
Description |
| IsPlaying |
bool (read-only) |
Whether the tween is currently active |
| Progress |
float (read-only) |
Normalized progress along the path (0–1) |
| Play() |
void |
Start or restart movement from the beginning |
| Pause() |
void |
Pause at the current position |
| Resume() |
void |
Resume from paused position |
| Stop() |
void |
Stop movement and reset progress to 0 |
| JumpTo(normalizedTime) |
void |
Jump to a specific progress value (0–1) |
| JumpToWaypoint(index) |
void |
Jump to a specific waypoint by index |
Scene View Gizmos
| Element |
Color |
Description |
| Waypoint handle |
Cyan |
Click and drag to reposition |
| Selected waypoint handle |
Yellow |
Currently selected waypoint |
| Path preview line |
Blue |
The full eased-motion path displayed as a series of short line segments |
| Current position |
Red sphere |
Current progress position shown in the scene |
PathPoint
A serialized struct representing a single waypoint on the path.
| Property |
Description |
| Position |
Local position relative to the PathTween GameObject's transform |
| Rotation |
Rotation at this waypoint (used when Rotation Mode is relevant or for reference) |
| Scale |
Scale value at this waypoint. When Scale Tween is enabled, scale interpolates between consecutive waypoints. |
| Delay |
Wait time in seconds at this waypoint before continuing (reserved for future use) |
| Easing Override |
Set to Global to use the component's easing setting, or pick a specific easing curve for the segment leading to this waypoint. -1 = Global. |
PathDefinition
A ScriptableObject asset that stores path data independently of any GameObject. Multiple PathTween components can reference the same PathDefinition.
Create via Right-click in Project > Create > SWTween > Path Definition.
| Property |
Description |
| Points |
Array of PathPoint structs (same fields as inline waypoints) |
| Closed |
When enabled, the last point connects back to the first to form a closed loop |
Benefits over inline waypoints:
- Share the same path across multiple objects
- Edit once, update all referencers
- Keep path data organized as project assets
- Prefabs can reference PathDefinitions without scene-specific setup
Easing (Static Utility)
float result = Easing.Evaluate(t, EasingType.QuadOut);
Static class providing all 20+ easing functions. Can be used independently of PathTween for any animation work.
| Method |
Description |
| Evaluate(float t, EasingType type) |
Returns the eased value for normalized input t (0–1) using the specified curve type |
Legacy Components
The original v1.0 components are preserved in the Legacy/ folder for backwards compatibility.
SimpleWaypointTween (Legacy)
The original path-following component. Moves an object between a fixed destination or an array of Transform waypoints using Lerp/Slerp/MoveTowards.
| Property |
Description |
| Active |
Enable/disable the component |
| Speed |
Movement speed multiplier |
| Fixed or Waypoint |
0 = move between start and a fixed destination, 1 = follow Transform waypoints |
| Use Arcs |
Uses Vector3.Slerp instead of Lerp for curved motion (damper mode only) |
| Damper Active |
When on, uses Lerp/Slerp (smooth approach). When off, uses MoveTowards (constant speed). |
| Loop |
Loop back to the start when reaching the destination |
| Look At Target |
Continuously rotate to face the current destination |
| Fixed Destination |
Target position offset |
| Waypoints |
Array of Transform references to follow |
| Destination Override |
Optional Transform to use as destination instead of the Vector3 |
SimplePathAvoidance (Legacy)
Companion component for SimpleWaypointTween. Uses raycasting in 4 directions to detect obstacles. When an obstacle is detected, it pauses the tween and redirects the object around the obstacle.
| Property |
Description |
| Enable Avoidance |
Toggle obstacle detection |
| Search Radius |
Distance of avoidance raycasts |
| Correction Speed |
Speed of lateral avoidance movement |
| Last Step Timer |
Duration to continue avoidance after obstacle is cleared |