My game is working - with MasterAudio on the main scene; there are sound effects and playlists.
Only two scenes for the game; Main scene in hierarchy and bootstrapper is additively loaded with a persistent Playerstats class.
I want to copy MasterAudio to the bootstrapper scene; the reason is I want to load different playlists for different builds (Windows standalone and Windows-Steam)
The idea being that I would conditionally load one bootstrapper scene (with MasterAudio) for the Windows build but another bootstrapper for steam build (Master Audio with same effects but extra playlists - and SteamWorks Complete). Sorry if TMI.
I dragged MasterAudio to the (additively loaded) bootstrapper scene and checked Persist Across Scenes (no Master Audio on the Main Scene) but received errors.
I dragged MasterAudio to the (additively loaded) bootstrapper scene and checked Persist Across Scenes BUT left MasterAudio on the Main Scene with Persist Across Scenes Unchecked; this works but the MasterAudio on the bootstrapper seems to be destroyed at first run but then appears after a scene reload and multiple songs play.
Any advice about how to correctly use Master Audio in this way? I read the Best Practices article in the Master Audio documentation - to get started - but I don't need audio to persist across scenes so I may be misusing the information.
Persist Across Scenes: Checking this will make it so the Master Audio game object (and all Playlist Controller game objects if you have them) will not be destroyed when loading new Scenes. If you are going to use this option, we recommend using a "bootstrapper" scene that only ever occurs once at the beginning of game play. The included example Scenes "BootstrapperDemoScene" and "GameScene" show this working with per-Scene sounds. Play the Bootstrapper Scene in the editor for instructions on setup. There is code in the Awake event of both Master Audio and Playlist Controller game objects to delete "extras" of those prefabs in case you choose not to use a bootstrapper scene and go back to the Scene with the persisted Master Audio.
Note: Make sure your Playlist Controllers don't have a parent game object in the Scene or they will not persist since we cannot assume that the parent should persist.
Note: If you use this option, you will likely want to use Dynamic Sound Group Creators to create temporary Sound Groups & Buses for each Scene. That way, only the Sound Groups that are used in all Scenes would be set up in the Master Audio game object and memory usage is not wasted, and you will have less Sound Groups overall for your sanity. And/or you should also investigate the different memory-saving Audio Origins.