# Library Manager

The library is primarily composed of two data structures: **Asset** and **Entity**. Their relationship is illustrated in the following diagram:

<figure><img src="https://886210201-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfI79StJ3o7OKZxf9vHhb%2Fuploads%2FLkfsBWWYy9AM51QeYmam%2FDataStructure.png?alt=media&#x26;token=225ba472-0e9a-42b0-9c1d-6f3a6c134498" alt=""><figcaption></figcaption></figure>

## Asset

Asset is a [ScriptableObject](https://docs.unity3d.com/Manual/class-ScriptableObject.html) that contains a collection of Entities. You can group commonly used sounds together in the same Asset. As you can see in the diagram above, all sounds related to the "Player" are stored within the Player Asset.

## **Entity**

An Entity represents a single sound, so when it is played, only one AudioClip from its [ClipList](https://man572142s-organization.gitbook.io/broaudio/core-features/design-the-sound#clip-list) will be played. Here, we set which AudioClip it should play, how it should be played, and what kind of characteristic it will have during playback.

### SoundID

When an entity is created in the LibraryManager, a SoundID is automatically generated. Once the SoundID is serialized (by \[SerializedField] or public), a dropdown menu appears in the inspector.

[see how to do this in action](https://man572142s-organization.gitbook.io/broaudio/overview/getting-started#declare-an-audioid-and-use-broaudio.play-to-play-it)


---

# 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://man572142s-organization.gitbook.io/broaudio/core-features/library-manager.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.
