> For the complete documentation index, see [llms.txt](https://speedtutoruk.gitbook.io/door-interaction-kit-doc/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://speedtutoruk.gitbook.io/door-interaction-kit-doc/managers-explained/audio-scriptableobjects.md).

# Audio ScriptableObjects

## Adding Audioclips

{% hint style="info" %}

1. ScriptableObjects for audio can be created by **Right Clicking anywhere in the project panel > Create > Sound** or duplicating an already created SO.
   {% endhint %}

<figure><img src="/files/d2foWZBZyQPPRzXOxo6W" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
2\. ScriptableObjects will all have specific settings that control the audio clip which is used, that you can change, the volume, pitch, variance and whether it can loop. All features of the default **AudioSource** component.
{% endhint %}

<figure><img src="/files/lAmK2Wvzi5IvoW1MZSkm" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
In the **AudioManager** is good to add the size of the **Sounds** array to the number of sounds which will play within this system. By default it has 3 SO audio clips, these should be added to access them all.
{% endhint %}

<figure><img src="/files/GEBIQwSu9VgSdVCZpxOn" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Look at the inspector of the **DoorInteractable / KeyCollectable / PlankInteractable** script and this will have slots for specific SO sound effects that you can add! This allows you to play that specific SO from the audio manager.
{% endhint %}

## **Referencing the Audio Manager**&#x20;

{% hint style="info" %}
Use the code, within your scripts to reference your sounds to play.&#x20;
{% endhint %}

```csharp
//This code will play the references ScriptableObject sound effect
DoorAudioManager.instance.Play(VariableName);
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://speedtutoruk.gitbook.io/door-interaction-kit-doc/managers-explained/audio-scriptableobjects.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
