I have created an audio mixer asset by following the video tutorials.
Instead of assigning the mixer through public values I want to know if I could load the audio mixer as a resource at run time? or alternatively create one.
I tried ‘Instantiate(Resources.Load(“MasterMixer”)) as AudioMixer;’.
But I get an error ‘snapshot.IsValid () && (snapshot->GetAudioMixer () == PPtr(this))’.
Basically I’d like to a level scene to check if it was loaded into the main scene. If yes, then route audio through main mixer, if not then create one on the fly for testing purposes.
We load our AudioMixer via Resources.Load without the instantiate and change the volume via script. Working pretty well at the moment except on iOS. Read this thread for more details: