|
Post by starfoxy on Feb 11, 2021 23:01:03 GMT
Hi everyone, I have some very early questions that I hope you can help me with.
I am building a top down 2D game. I would like some of my audio sources to be fainter or louder depending on player proximity. I would probably like to use occlusion in some areas. From what I can tell reading support threads, I will need to use 3D audio. Is this correct? Has anything changed with the approach to 2D audio in the past few years?
It isn't clear to me how I should configure MA out of the box. Obviously, I do not want to disable 3D Sound?
What about 2D or 3D physics? Should I be enabling those? Addressables? I have read the documentation and it isn't quite clear to me if I need to enable these or not for what I would like to achieve. Is there a performance hit?
Thank you for any assistance, tips or pointers that you can provide.
|
|
|
Post by DarkTonic Dev on Feb 12, 2021 2:40:56 GMT
Yes that is correct, use 3D audio.
The reason the support checkboxes are on the Welcome Window is to ensure Master Audio compiles when you install it, since any of those packages can be uninstalled. If you have the Unity package, then enable the support.
There is no performance hit. Using Occlusion period will affect performance since it does Ray Casts but you can't even use Occlusion with 3D anyway. There would be a slight performance cost for Ambient Sound script as well, but you can't use it without physics.
If you have enabled the support and don't use the scripts (Ambient Sounds, Occlusion), it will not impact your performance at all. Or if you don't set up any Addressable audio in Master Audio, same thing.
I'll add some clarification to the online page about this.
Thanks! -Brian
|
|
|
Post by starfoxy on Feb 12, 2021 6:38:34 GMT
Thank you kindly. That is very helpful.
I have gotten my audio working now and it fades away with distance and plays in the proper left or right channel based on player position. Woot! This is great!
One question I have that I am sure is obvious is the audio seems to cut left or right fairly abruptly when moving my player. Is there a way to create more of a blend? ie. If my player is exactly centered with the audio source then there would be audio coming out of the left and right speaker at the same time.
|
|
|
Post by DarkTonic Dev on Feb 12, 2021 7:39:55 GMT
I don't have an idea about that one. Sounds like your Audio Listener is on your character. You may want to ask on the Unity audio forum and report back.
-B
|
|
|
Post by starfoxy on Feb 12, 2021 17:18:18 GMT
That is correct. I thought having my audio listener on my player was the correct way to go about all of this. Should I be putting it somewhere else?
I am still grappling with where Master Audio begins and where Unity Audio ends. ie. I realize Master Audio isn't a replacement for Unity Audio but am still learning what pieces Master Audio replaces and overrides.
|
|
|
Post by DarkTonic Dev on Feb 12, 2021 22:58:05 GMT
Master Audio does not replace Unity Audio at all. It just augments it.
The Audio Listener and the Audio Sources will be behaving the same whether you are using Master Audio or not. That's why I suggested you post this question on the Unity Audio Forum since it doesn't matter that you are using Master Audio. In fact, don't mention it.
-B
|
|