# Animation Path Visualizer

Editor visualization tool for previewing and debugging object movement paths in Unity scenes.

{% embed url="<https://assetstore.unity.com/packages/tools/animation/animation-path-visualizer-325611>" %}

{% tabs %}
{% tab title="Overview" %}
Animation Path Visualizer is a Unity Editor extension that visualizes and edits motion paths directly inside the Scene view.

It analyzes position curves (`m_LocalPosition.x/y/z`) from Animation or Animator components and renders the resulting trajectory in 3D space. Keyframes, tangents, and motion velocity can be inspected and modified directly using scene handles.

The tool supports both Mecanim (Animator) and Legacy Animation components, automatically selecting the first valid clip containing position curves.

This is a fully Editor-only utility and does not execute in runtime builds.

<figure><img src="/files/guYj3nlhBM5mKqtx74WG" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Installation" %}
Import the package via the Unity Asset Store or Package Manager.

The tool is available under:

```
Tools > Animation Path Visualizer
```

All Editor scripts are contained inside `Assets/AnimationPathVisualizer/Editor/`, ensuring there is no runtime footprint.

No additional setup is required.
{% endtab %}

{% tab title="Quick Start" %}

1. Open the window from the Tools menu.
2. Select one or more GameObjects that contain either:
   * An Animator component, or
   * A Legacy Animation component
3. The Scene view will immediately display the motion path.
4. Toggle keyframes or velocity visualization using the toolbar.
5. Enable **Lock Selection** to prevent selection updates while editing.

Keyframes appear as sphere handles when enabled. Clicking a keyframe activates edit mode, allowing position and time adjustments directly in 3D space.
{% endtab %}

{% tab title="Workflow" %}
The tool operates entirely inside the Scene view using Unity Handles.

When a GameObject is selected, the system:

* Detects a valid AnimationClip (Animator first, then Legacy)
* Extracts local position curves
* Samples the clip at approximately 60 FPS
* Reconstructs the world-space motion trajectory

The resulting path is rendered as connected line segments.

If Velocity mode is enabled, segment color is interpolated between green (low speed) and red (high speed), based on per-frame displacement magnitude.

Interactive operations available:

• Shift + Left Click on a segment → add keyframe\
• Ctrl/Cmd + Left Click on a keyframe → delete keyframe\
• Drag keyframe sphere → move spatial position\
• Drag tangent handles → adjust curve tangents\
• Use time slider (GUI overlay) → modify keyframe time

All modifications are applied through `AnimationUtility.SetEditorCurve` and recorded using `Undo.RecordObject`.

Selection locking allows editing multiple objects simultaneously without losing focus.
{% endtab %}

{% tab title="Technical Notes" %}
Animation Path Visualizer is implemented as a custom `EditorWindow` that hooks into `SceneView.duringSceneGui`.

#### Supported Clip Types

• Mecanim Animator clips\
• Legacy Animation clips\
• Root motion position curves (root-level only)

Only position curves are processed.

#### Curve Detection

The system retrieves editor curves using:

```
m_LocalPosition.x
m_LocalPosition.y
m_LocalPosition.z
```

and, for root motion:

```
RootT.x
RootT.y
RootT.z
```

#### Editing System

Keyframe edits affect:

* Value (position)
* Time
* Tangent slopes (in/out)

The tool modifies AnimationClip assets directly via `AnimationUtility.SetEditorCurve()`.

#### Performance

Sampling is capped between 8 and 600 segments per clip, based on clip length (\~60 FPS target).

As an Editor-only visualization, it has no runtime cost&#x20;
{% endtab %}

{% tab title="Limitations" %}
The free version includes core visualization and editing features but has deliberate scope limits.

It supports only:

* Transform position curves
* The first valid clip found on an object
* One AnimationClip at a time per Transform

Not supported:

* Rotation curves
* Scale curves
* Blend trees
* Non-transform animated properties
* Multi-clip blending visualization
* Animation events editing
* Timeline integration

Velocity visualization is based on frame-sampled displacement and does not account for acceleration smoothing.
{% endtab %}

{% tab title="FAQ" %}

<details>

<summary>Does this tool modify my AnimationClips?</summary>

Yes — only when you explicitly edit keyframes (move, retime, add, or delete). All changes are recorded through Unity’s Undo system

</details>

<details>

<summary>Does this affect runtime performance?</summary>

No. All scripts are located inside an `Editor` folder and do not compile into builds&#x20;

</details>

<details>

<summary>Why is my animation not appearing?</summary>

Possible causes:

* The object has no position curves.
* The clip is not set as default state in the Animator.
* The animation uses blend trees.
* Only non-transform properties are animated.

The tool selects the first valid clip containing position curves

</details>

<details>

<summary>Can I use this with Legacy Animation clips?</summary>

Yes. A utility menu is included to mark selected `.anim` files as Legacy if needed&#x20;

</details>

<details>

<summary>Are edits permanent?</summary>

Yes. When you modify keyframes, the changes are written to the `AnimationClip` asset. You can revert changes using Undo (Ctrl/Cmd + Z).

</details>
{% endtab %}
{% endtabs %}

***

{% content-ref url="/spaces/u6FKPRtV6vGPNteP2vic/pages/ifFwnw4g3CFWxWpGlsEX" %}
[Animation Path Visualizer Changelog](/julestools-docs/changelog/readme-4.md)
{% endcontent-ref %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://julestools.gitbook.io/julestools-docs/documentation/tools/animation-path-visualizer.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
