> For the complete documentation index, see [llms.txt](https://sonity.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sonity.gitbook.io/docs/sonity/templates-and-examples.md).

# Templates & Examples

Built in templates in Sonity which you can use as a starting point

Sonity contains examples and script templates of advanced functionality which you can use in your game.

#### Example\_AudioMixer.mixer

Is an example AudioMixer with groups such as Example\_AMB, Example\_MUS, Example\_SFX, Example\_UI and Example\_VO.

#### TemplateSoundMusicManager.cs

Template of a singleton music playback system.\
Add to a GameObject in the scene and use like this:

```csharp
SonityTemplate.TemplateSoundMusicManager.Instance.PlayMainMenu();
```

#### TemplateSoundPlayUI.cs

Template of a singleton used to play e.g. UI sounds.\
Useful when you want to play [SoundEvents](/docs/soundevent.md) in a lot of places through code.\
Add to a GameObject in the scene and use like this:

```csharp
SonityTemplate.TemplateSoundPlayUI.Instance.PlayButtonClick();
```

#### TemplateSoundVolumeManager.cs

Template of a singleton AudioMixer volume controller.\
The default settings work with the provided "Example\_AudioMixer.mixer".\
Add to a GameObject in the scene and use like this:

```csharp
SonityTemplate.TemplateSoundVolumeManager.Instance.SetVolumeMaster(1f);
```
