Other > Gaming > Working in Unity > Working with Audio

About Working with Audio in Unity

When you create scene files in Harmony with audio, the audio is exported into the project folder. However it’s important to understand how the game is built to determine the best way to handle audio.

When a game is built from Unity, it creates its own database for holding the assets. Within the export, the Streaming Assets folder is preserved intact. This is what enables the Toon Boom plugin to access those assets on the fly, and render them in the camera to create the final animation you see on the screen.

However when it comes to audio, the game first looks for the audio in the Unity database. So this is the most efficient place to store the audio for the real game.

If audio can't be found in the Unity database, then the game looks in the Streaming Assets folder to find the audio. When it does, it copies the audio on-the-fly back into the Unity database. Since this action is quite costly, don’t leave the audio in the Streaming Assets folder for the final game. It’s fine to leave it there while you’re testing, but not for the final game.

The audio should be copied back into the Unity database, either manually or by automating this process with a script.