dvijay
New Member
Posts: 2
Posts: 2
|
Post by dvijay on Apr 9, 2021 21:43:29 GMT
This might be a pretty basic question. I have a simple use case for my game. It has 2 main types of audio: background music and sound effects for certain events. I want to control mute and volume for both these categories separately via API. I created a playlist for the background music and control that using MasterAudio PlaylistMasterVolume and MutePlaylist methods. But I'm not sure how to manage the effects. I created a bus with different effects (like walk, hit, cry, etc) and use MuteBus for fx mute control. And I'm using SetGroupVolume with the bus name for volume of all these effects. But there is no similar GetGroupVolume to get the current volume. Is this the right approach or am I doing something wrong here? Any feedback or advice is appreciated.
|
|
|
Post by DarkTonic Dev on Apr 10, 2021 0:11:37 GMT
I think you may be overthinking it. Not sure you ever need to "get" the current Group or Bus volume (which you can do and I can look it up). You just need to set it. Event Sounds script can set both the Master Mixer Volume (for Sound Groups) and Master Playlist Volume, both of which are persistent, on a UI slider control. The slider will reflect the current volume at all times. You don't need to write any code at all.
-Brian
|
|
dvijay
New Member
Posts: 2
Posts: 2
|
Post by dvijay on Apr 10, 2021 0:25:47 GMT
Ah gotcha! That makes sense. Thank you so much for the response! Other than that, does it make sense to have various sound effects in the game configured under a bus? Is that the best way of doing that?
|
|
|
Post by DarkTonic Dev on Apr 10, 2021 2:35:28 GMT
Buses are used to control whole groupings of sound effects, like UI, Ambient, enemy, player etc. You can also use them to force to 2d and limit voices.
|
|