rancex
New Member
Posts: 18
Posts: 18
|
Post by rancex on Apr 30, 2021 9:51:55 GMT
Hello, I am new to Master audio and would like to ask some questions.
I would like to add a sound group with all the settings and variations at runtime, with all the settings saved as a Scriptable Object. Since master audio already provides a nice interface to modify these settings, I would like to try to make a scriptable object with all the settings that I can modify. For example, I would make a SO with name "gunshotSO" and insert all variations of a gun shot sound, with all the different pitches and volume.
I understand that MasterAudio.CreateSoundGroup only accepts DynamicSoundGroup, so my best guess is to create a scriptable object with this variable and make a custom inspector for it. I am fine if some settings such as localization is omitted, but variation list and settings must be modifiable at the SO. Instantly copying the default DynamicSoundGroup custom inspector causes errors, but I suppose this is because of its default behavior of creating gameobject as its child, and I think it should be possible to strip some of this functions.
I mainly make it into SO to both make it easier for my audio designer to simply shuffle through the SO instead of scene-by-scene, and because we might support audio modding later.
In short, I want to make a mini DynamicSoundGroup into a scriptable object then inject it to the main master audio object at runtime. Is this possible, or is there another approach I can do?
Any help will be appreciated, thank you!
|
|
|
Post by DarkTonic Dev on Apr 30, 2021 16:27:42 GMT
Not sure I understand the need yet, however I wonder why your audio designer wouldn't just modify a Dynamic Sound Group Creator prefab instead of worrying about particular Scenes?
Please explain why that doesn't work for your use case.
Thanks, -Brian
|
|
rancex
New Member
Posts: 18
Posts: 18
|
Post by rancex on May 3, 2021 3:54:19 GMT
Hi there, sorry for the late reply
The reason I want to try to make it into SO is because our previous audio system uses it for modding, and our audio designer should be more familiar with it. But I thought about your solution, and realize I can just make multiple DSGC gameobject. I am so used to doing SO...
Will there be any performance impact if multiple DSGC objects is in the scene? Especially since some of this objects might actually have the same contents. It is possible to clear them up but the auto-remove audio from memory feature will be triggered, so I must do some workarounds for it, and it is too good to pass up.
Thanks for the help!
|
|
|
Post by DarkTonic Dev on May 3, 2021 15:15:52 GMT
No, no drawback for multiple DSGC. We use it all the time.
-B
|
|
rancex
New Member
Posts: 18
Posts: 18
|
Post by rancex on May 3, 2021 16:23:28 GMT
Alright then, one last question(or a feature request), although somewhat out of topic.
When trying to make DSGC prefabs, I noticed that you can't add a new audio clip or variations through the prefab or project view, and can only do so through the scene view. While a somewhat minor inconvenience since I can just save a prefab in scene view, I wonder if it will be possible to make it so I can do it through the prefab view.
|
|
|
Post by DarkTonic Dev on May 3, 2021 18:17:20 GMT
It's possible but it presents a problem for how complex it is to make it work in all the various versions of Unity. We support versions before nested prefabs and want to keep it that way.
Normally you'd always be in a Scene anyway so just edit it there.
|
|
rancex
New Member
Posts: 18
Posts: 18
|
Post by rancex on May 3, 2021 19:12:59 GMT
True, but being able to instantly edit the prefabs allow us to skip a step of dragging the object and modifying it. But like I said, it is just a minor inconvenience. I suppose separating the features of both versions before and after nested prefabs for a minor thing like this is indeed too much trouble.
Thanks again for the help!
|
|
|
Post by DarkTonic Dev on May 3, 2021 19:37:23 GMT
What I'm saying is that you could go to the Scene where the DGSC "lives" and edit it directly there. That's what I'm used to.
Thanks for understanding.
|
|