# 🎭 4. Hybrid ECS & Animation

#### The FmodAnimatorBridge

Syncing standard Unity Animations (like footsteps) with DOTS audio is usually a headache. We solved this with the  component.

1. Attach <kbd>SncAnimatorBridge</kbd> to your character `GameObject` (next to the Animator).
2. Add a new element to the **Audio Events** array.
3. Give it a name (e.g., `Footstep`) and select your sound from the beautiful `[SncEvent]` dropdown.
4. Open the Unity Animation Window, add an Animation Event, select `PlayAudioEvent(string)`, and type `Footstep`.

The bridge will safely catch the OOP event and dispatch it to the Burst-compiled DOTS queue without any GC allocations!

#### Proxy API

If you need to play a sound from a standard `MonoBehaviour` (e.g., a UI Button click), use the Proxy API extensions:

```csharp
public void OnButtonClick()
{
    SncAudioID.UI_Click.Shot(transform.position).ProxyEvent();
    SncBusID.Master.ProxyBusVolume(0.5f);
}
```


---

# 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://sniveler-code.gitbook.io/dots/audio-dispatcher-fmod/4.-hybrid-ecs-and-animation.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.
