Magic Listener - Multiple Audio Listener Solution
the Loftens
$10.00
(no ratings)
Date |
Price |
---|---|
日期和时间 |
价钱($) |
01/28(2022) |
10.0 |
11/18(2024) |
10.0 |
Jump AssetStore
A simple solution for splitscreen and other situations where you might need more than one audio listener. Great for multiplayer and general spatial sound solution.For the demo scene: You may have to upgrade the materials for use in your desired pipeline to see anything other than pink. HOWEVER, this is not NEEDED. It will still work if everything is pink - the demo scene materials are not important - this is a tool for audio, you can still hear it in action. :)2019.4.x and higherPlease contact us if there are any other compatibility issues.A simple solution for splitscreen and other situations where you might need more than one audio listener.The problem we solve:By default, Unity does not currently have a solution for when there is a multiplayer setup that uses 3d spacial sound. This means if you have a split screen and players are in different areas of the map, unity's built-in audio listener would not pick up sound from the second listener but would instead throw an error due to having multiple listeners.The way we solve it:This package simply decides when to apply a sound based on distance to the closest "magic ear" or audio listener and when to change back to the single-listener setup.Easy Setup/Removal:Since ALL the work is done at runtime(on enable), setup and cleanup is easy. To use, simply add the Magic Ear to all listeners youd like to pick up sounds and add a Magic Mouth to all the audio sources. Leave the original Audio Listeners and Audio Sources on those objects as well and tweak those how you normally would to your liking.Not a fan? To remove, just remove the Magic Ears and Magic Mouths and your Audio Listeners and Audio Sources remain untouched.Check the features in "Technical Details" below...Cool features:All(or most) audio source settings will work like normal.Super easy to use with no prior experienceAbsolutely no extra settings needed - works right out-of-the-boxOnly 2 scripts needed! A "Magic Ear" for the audio listeners and a "Magic Mouth" for the audio sources.Ability to change the effective radius on an audio source when specifically using multiple listeners WITHOUT affecting the radius when using only one listener.Not just a multiplayer solution - this could also work on things such as replay cameras, audience, death cams...This works on instantiated prefabs as well so dynamic updating should be a breeze.Helpful Notes:This package does not play or stop an audio.Non-intrusive scripts. Any Audio Source settings that are changed by this package will only be changed temporarily at run time and will remain unchanged if the package is removed of you return to edit mode.Its POSSIBLE some errors may occur when the scene ends or leaving runtime. This is due to a clean-up script that is fighting for order while things are being destroyed. If this is ocurring, please let us know and we will update the script or add switches to adjust how assertive the clean-up is.Online multiplayer - Though this would work for online multi-player, in most cases, its probably just better to remove the audio listeners from the players that join the server that arent local. There are no issues with Magic Listener in relation to this, it just makes more sense to remove them to prevent sounds from random locations that a remote team-mate/competitor is experiencing. However if your goal is to allow ALL players to hear the same things, leave the listeners and it will be fine -this kinda sounds like a neat game mechanic, actually.Known Bugs:Upon destroying an object containing a Magic Ear Listener while it is in the radius of the Magic Mouth Source, its possible that there is a small maximum of 0.25 second delay before volume is reduced when using multiple listeners. We may add a way to reduce this amount of time in the future, but this is mainly a way to prevent a remnant after an object leave the mouth radius. This is less of a bug and more of an intended feature for a balankce of performance and functionality.If you notice anymore bugs, please contact us immediately. We will respond quickly and will apply a hotfix, when able.Disclaimer:It is not really possible to play 3D sound for multiple listeners that share the same device - this just means if two listeners were standing equal distance with opposite ears facing the sound, the speaker would get confused and would not know whether to play it form the left side or right side. So instead, we temporarily shift your sound to 2D and emmulate a 3D experience based on distance from the audio source.