- Home /
Toggling BGM and SFX
I have seperate ways on handling the background music(BGM) and the sound effects,(SFX). The former needs to take an array of audioclips and randomly choose one, the latter just plays a sound and cleans itself up after it's done. While AudioListener.PlayClipAtPoint does the latter nicely, muting SFX also mutes everything. Currently I'm letting the Sound Handle handle everything related to sounds by creating two functions to be called when playing sounds, and have two boolean variables, BGM and SFX to be checked to mute the audio.
Is there a better way provided by Unity to solve muting BGM and not SFX, and vice versa?
Comment