Topic: Different mixer groups

I couldn't find anything mentioning this when searching so sorry if it's been mentioned before.

I'm trying to manipulate music and sound effects separately.  I can see the music goes to the audio source on the main camera, and the sound effects have a new audio source created on the camera.  I've adjusted this so the sound effects go to the same audio source as the music, but is there a way to have the sound effects go to its own mixer group so I can mix it differently with effects?

Thanks to anyone who can help.

Share

Thumbs up Thumbs down

Re: Different mixer groups

You probably don't want to have Sound Effects and Music on the same source.  You have far less control over either of them that way.  I would still keep them separate, but just make both Output to the same mixer group instead.

You might need Source version, which I assume you have if you've been able to put sound and music onto the same audio source.  I've tried to find scripting references for using Audio Mixers, but I'm not having much luck.  It is on the cards for one of my projects, so I'll return here with my findings once I get up to it.

Share

Thumbs up Thumbs down

Re: Different mixer groups

YumChaGames wrote:

You probably don't want to have Sound Effects and Music on the same source.  You have far less control over either of them that way.  I would still keep them separate, but just make both Output to the same mixer group instead.

You might need Source version, which I assume you have if you've been able to put sound and music onto the same audio source.  I've tried to find scripting references for using Audio Mixers, but I'm not having much luck.  It is on the cards for one of my projects, so I'll return here with my findings once I get up to it.

The best I could manage (I hate how I've done it but it works until I can figure out a better solution) was to create new public AudioMixerGroup variables, attach the group I wanted in the inspector, add new public static variables, assign them in awake, and set the musicAudioSource and soundsAudioSource outputAudioMixerGroup to those public variables.

It's not how I planned on doing it at all but I was struggling using a separate class and getting errors to do with static variables and such so I ended up doing it all in the UFE class.  Horrible implementation, but it works.

Share

Thumbs up +1 Thumbs down