# Quick Start

### Quick Start — Animation Sequences

This guide helps you set up your first animation sequence using the plugin. You’ll learn how to create and preview VFX, audio, or prefab spawns synced with animation — using a custom SequenceData asset and Animation Events under the hood.

<figure><img src="https://583936762-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDwnmaSydNAKJ0jzg52Wr%2Fuploads%2FcyKf0mYioR8AG1eWjze7%2FUnity_1A8OcfBc2U.gif?alt=media&#x26;token=66ff8d7d-92f7-4545-ad65-1609a41f1068" alt=""><figcaption></figcaption></figure>

***

#### 1. What is this tool?

**Animation Sequences** is a custom Animation Event editor made for Unity. It allows you to spawn VFX, sounds, prefabs, and call public methods during an animation — with a powerful preview system and Addressables integration.

It works by editing `SequenceData` assets and baking events into the animation using Unity’s `AnimationEvent` system.

***

#### 2. Requirements

Before using, make sure:

* Your prefab has an <mark style="color:yellow;">**Animator**</mark> component.
* Your prefab also includes a <mark style="color:yellow;">**SequenceEventsReceiver**</mark> on the <mark style="color:yellow;">**same GameObject**</mark> as the Animator.
* You’re working with a <mark style="color:yellow;">**prefab instance in the scene**</mark> (not a regular GameObject or asset).

<div align="left" data-full-width="false"><figure><img src="https://583936762-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDwnmaSydNAKJ0jzg52Wr%2Fuploads%2FBr7mcGth6pF81JqCNnTY%2Fimage.png?alt=media&#x26;token=d9e74671-3998-4eb6-ba4a-e4a3bb53fa23" alt=""><figcaption></figcaption></figure></div>

***

#### 3. Setup Flow

1. Go to **`Tools > Animation Sequence > Sequence Preview Window`**
2. Select your prefab in the **scene**
3. In the window, click **“Start Edit”**
4. If no `SequenceData` exists yet, click **“Create Sequence Data”**
5. Assign an **Animation Clip** to the SequenceData
6. Click **“Add Event”** to create a new spawner

> 💡 Any `SequenceData` you create will be **automatically added to Addressables** if not already.

<div align="left"><figure><img src="https://583936762-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDwnmaSydNAKJ0jzg52Wr%2Fuploads%2F3iL5AVCMun2Ocrl7FcHW%2FUnity_jyesl0KUUw.gif?alt=media&#x26;token=99657f64-379e-41fc-a3b5-bb59bab0d54a" alt=""><figcaption></figcaption></figure></div>

***

#### 4. Adding Spawners

Each **spawner** represents something that will be triggered during the animation.

You can configure:

* **Trigger Time** (frame/time)
* **Prefab** to spawn (VFX, mesh, audio source, etc.)
* **Transform offsets**
* **World or Local space**
* Optional **Audio** or **Method** call

***

#### 5. Baking the Animation

After you’ve configured all your spawners, you need to **bake** them into the animation clip.

Click the **“Bake”** button to inject Animation Events directly into the selected clip. These events are later used at runtime by the `SequenceEventsReceiver` to trigger the VFX, sounds, prefabs, or method calls.

<div align="left"><figure><img src="https://583936762-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDwnmaSydNAKJ0jzg52Wr%2Fuploads%2FnMG1PBL86JY6B4CchbTx%2FUnity_7Gpi84AAR2.png?alt=media&#x26;token=2e677fdb-813d-4283-90a3-c4457da4d349" alt=""><figcaption></figcaption></figure></div>

{% hint style="warning" %}

#### Read-Only Clips (FBX / Imported Animations)

If the animation clip comes from a **read-only source**, such as an imported FBX file, Unity doesn’t allow modifying it directly.\
In this case, the plugin will **prompt you to duplicate the clip** before continuing.

This is a Unity limitation — only `.anim` files (created inside Unity) can be edited directly.
{% endhint %}

**What happens:**

* You choose a location to save the duplicate `.anim` file
* The new clip is linked to the SequenceData
* It is also automatically added to the Animator Controller (if needed)
* You can then bake events into this new, editable clip

***

#### 6.  Runtime Execution

At runtime:

* `SequenceEventsReceiver` receives the Animation Events
* It parses the event data, loads the Addressable, and spawns it at the right position
* Method calls (if defined) are invoked directly on the specified component type

<div align="left"><figure><img src="https://583936762-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDwnmaSydNAKJ0jzg52Wr%2Fuploads%2FBr7mcGth6pF81JqCNnTY%2Fimage.png?alt=media&#x26;token=d9e74671-3998-4eb6-ba4a-e4a3bb53fa23" alt=""><figcaption></figcaption></figure></div>


---

# 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://denniodev.gitbook.io/animation-sequences/quick-start.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.
