Unity: 1.0 - Adding a simple background track to your scene

This article will show you how to add a simple background track to your scene.

Adding a background track to a scene

By default the first track in your project will play at scene start.
To disable that behavior and control audio playback, go to the main plugin settings and turn off "Auto Play Project".
Then drag the "PM_LoadTrack" prefab into your scene. Specify either a track id or an array index for a track from your PlusMusic project and select "Load On Start" and "Play After Load".

Save your scene and hit play in the Editor. You should see activity in the “Console” log window and hear your track audio playing after it has been downloaded.

Alternatively, you can use the "PM_Trigger_LoadTrack" prefab and place it into your scene. Set it to collide with your player object and you can trigger a track load that way, for example when the player opens a door or crosses a threshold.

Turn off Auto Play Project in the main plugin settings.
Drag the PM_LoadTrack prefab from the Assets/PlusMusic/Prefabs folder into your scene.
Make sure the “Load On Start” and “Play After Load” options are selected.
You can specify which track from your project you want to play by either using the track id or the array index.