|
Post by mariuszd on Feb 9, 2023 15:17:05 GMT
Hello!
I've tried browsing through older threads and using the search function but hand't found enough answers so sorry if some of it repeats.
I'm currently trying to figure out how properly work with MasterAudio in our project. Most of our stuff is prefab-based since we're highly dependand on object pool. We have one bootloader scene, one main menu scene and currently one gameplay scene with few more incoming in the future.
The questions/issues I have are:
1) let's say I want to have 10 types of enemies. As far as I understand I should a DSGC component as it's children. The thing is I seem unable to select any of already created bus groups. I could use [Existing Bus] I guess but am not sure if that's a proper way.
2) should I have DGSC for every single audio source in the scene? That way it would make, lets say, a 1000 instances of DGSC on the scene. Is this still okay?
3) is there and if so, what is the proper way to edit sounds in runtime? Let's say I've got 10 weapons and I want to tweak its' volume. Should I write down each volume and then set it when play mode is off or is there a way to save it somehow? I've noticed there's a "Save Runtime Changes" but the documentation suggests hardly not to use it.
Thank you very much!
Best, Mariusz
|
|
|
Post by DarkTonic Dev on Feb 10, 2023 4:31:11 GMT
Yes, use [Existing Bus] if you don't want to create a new bus.
Yes, you can put a DSGC as a child of whichever prefab. That will "just work". Alternatively, you could have a DSGC with many prefab's sounds on it that you enable when it's time for those prefabs to exist (a "wave" or whatever). But it's easier to manage on the prefab itself.
Ultimately, it's up to you whether you even want to use DSGC. You could have often used sounds just always sitting in the Master Audio game object. To avoid taking all the memory, you can turn off "Preload Audio Data" for those clips or use Resource files or Addressables.
It's ok to have 1000 instances of DSGC in the Scene, however any normal audio clips referenced will be taking up audio memory all the time. Unless you turn off "Preload Audio Data" or the other options.
Save Runtime Changes may work fine most of the time. If you run into any weird error, remember to turn it off and see if the error goes away.
Let me know if you have other questions! -Brian
|
|
archee
New Member
Posts: 1
Posts: 1
|
Post by archee on Feb 23, 2023 8:30:19 GMT
Hey there!
I'm trying to find a solution for playing one sound by two gameobjects in the same time (motor engine sound). There's a problem that I have to import two the same files with different filename into the group control to play that. However I would like to use just one file. How to solve that problem?
Thanks in advance for quick support!
--Edit: It seems, that I found the solution. I've extended voices weight.
|
|
|
Post by DarkTonic Dev on Feb 23, 2023 16:14:35 GMT
That is correct. Actually if you turn on "Log Sounds" for the Sound Group it will tell you what to do if the sound doesn't play. There are many causes.
|
|