Search Unity

Master Audio - AAA Sound Solution. #1 audio plugin on Asset Store!

Discussion in 'Assets and Asset Store' started by dark_tonic, Jan 28, 2013.

  1. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    That's the way I code and is a general best practice. i.e. everything should be private until it is proved that it needs to be public. It's less noise for coders looking at the API to have to wade through and is more "black box" - not needed to do what you want to do. You can send me an email on which ones you had to make public and I'll consider whether or not to make the public in the official build or perhaps move them to a different class where that would be fine.
     
  2. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    DarkTonic is proud to announce RelationsInspector (link here) integration with Master Audio! This is invaluable for sound designers! The next update will include the free version of RI and a very useful Master Audio "backend" showing things like the following:

    #1, see Scene objects using Mechanim trigger scripts (included with MA) to play sounds (not even possible to view in Inspector since it's in the Mechanim window!)

    mechanimRelations.PNG

    #2, see Scene objects using a particular Sound Group (or all). Bus and Group filters let you narrow down when there are too many. Works in runtime and edit time! There will be a new black magnifying glass icon in each mixer and bus row which will open the RI window with the appropriate filter.

    GroupRelations.PNG
     
    Last edited: Mar 14, 2016
  3. PatrickLipo

    PatrickLipo

    Joined:
    Mar 14, 2015
    Posts:
    36
    Hi there! I just completed a 7-Day game jam (7DRL) and MasterAudio helped me extensively for this year and last year's entry. However, this year I had to switch from publishing my results on the old Unity WebPlayer to using WebGL... and all my sound effects play clipped or truncated (but my music works fine). 10 seconds with the game should demonstrate: http://www.patricklipo.com/projects/autofire/index.html

    It all works great as a standalone PC build (thank goodness), and when I replace my MasterAudio sound calls to playing a standard Unity audio clip, I hear my sounds properly in WebGL. I've tried reducing my sample rate, went mono, changed to ADPCM and I'm at a bit of a loss. Any advice here?
    upload_2016-3-16_8-17-1.png
     
  4. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Do you have any errors logged? I'm not sure how you would even get those in a WebGL build...never made one myself. I bought a plugin that can show the Console window in a build. Do you have anything like that?

    This is the first time the issue you describe has been reported.

    I haven't used the "normalize" checkbox before, not sure what it does. If you turn that off does it fix the issue?

    Also, you shouldn't be using compressed format for sound effects as it takes about 50 times as long to start playing (extra unneeded latency). Are you aware of that? Read the "best practices" section of the online documentation if you haven't.
     
  5. PatrickLipo

    PatrickLipo

    Joined:
    Mar 14, 2015
    Posts:
    36
    I had consulted this Best Practices page, but I don't know if there's another, but I didn't find much about clip setup there.
    I'm not using compressed sound effects during execution to my knowledge, this decompresses on load. My only other options there are "compressed in memory" and "streaming". I don't get a lag on the EXE, but if you mean I should use PCM I'll give it a shot.

    I'll also see if there's any way to get a log out of WebGL...
     
    Last edited: Mar 17, 2016
  6. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    I assumed because you're using "decompress on load" that it's compressed, or how could it decompress if not? So I believe it is compressed audio of some format. I'm saying use a wav file or other uncompressed format, not mp3 or any other compressed option. I remember using Decompress on Load a couple years ago (pre Master Audio) and it was horrible on memory usage.

    Actually this tip is not in the Best Practices page, but on the "Audio Memory Allocations" page linked right under that one on the TOC. Sorry about that.

    We use a plugin called SRDebugger to get a view of the Console on all platforms. It's so easy, no setup required.

    https://www.assetstore.unity3d.com/en/#!/content/27688

    I also found a blog of recommended settings if you care to try what he says:
    http://blog.theknightsofunity.com/wrong-import-settings-killing-unity-game-part-2/

    He does mention that WebGL only supports one of the formats.
     
    Last edited: Mar 17, 2016
  7. PatrickLipo

    PatrickLipo

    Joined:
    Mar 14, 2015
    Posts:
    36
    I tried full-on PCM files (decompress on load if that matters) and eliminating the "normalize" option (which seems to be a recent add to the "Force to Mono" option), but no luck. PCM is as uncompressed as I can make it, and the dropdown still appears in that case. All the Best Practices and links tell me variations of the same thing: Be aware of your memory usage on load and on execution, and none of it seems relevant. If this were actually about AudioClip settings, as I said before, when I replaced the MasterAudio calls with Unity Audio calls they worked fine in WebGL.

    I tried a console in a WebGL and got no errors. A report I set up in that console has PlaySoundResults reporting snd.ActiveVariation.IsPlaying going to false after about ~0.1 seconds (implying the clip is truncated to about .1 sec whereas in windows it reports the entire 1 second). I've also tried Following transforms, 2D sounds, Forget and not Forget, etc.

    So I'm confused, does MasterAudio support WebGL? If not, I'd rather stop wasting my time on this issue and move on.
     
    Last edited: Mar 19, 2016
    d1favero likes this.
  8. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    It support all platforms. Please send me a project that reproduces this bug so I can look into it. I don't believe that if I just make *any* webGL build with Master Audio that it will fail every time. Mainly because you're the first person reporting this and we have over 6,000 users.

    Please read and follow our official bug reporting post on our support forum.

    Also, did you mention if this works fine in editor, and just not when you make a build to webGL?
     
  9. PatrickLipo

    PatrickLipo

    Joined:
    Mar 14, 2015
    Posts:
    36
    Hey no insult intended, I love the tool and have had it for over 2 years... I just couldn't find a list of supported platforms, and for that matter I don't know if my Unity version's WebGL is weird. I'll try throwing the code in a standalone and see what happens. Yeah, it works in editor, in windows standalone, and in the crusty old WebPlayer.
     
  10. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    No offense taken. I hear your frustration and want to get it fixed as quickly as possible. And the best way is if you send me a small project that reproduces the problem. By the way I updated the asset store description to say "supports all platforms"
     
  11. boolean01

    boolean01

    Joined:
    Nov 16, 2013
    Posts:
    92
    Hi there

    Is it possible to skip to a certain time in a song? In some cases I'd like to skip to the halfway point of my song but I can't see anything in the documentation to allow this.

    Any advice?
     
  12. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    You can always use code like this to skip to 30 seconds for instance:
    Code (csharp):
    1.  
    2. PlaylistController.Instances[0].ActiveAudioSource.time = 30f;
    3.  
    That code would work if you have a single PC, otherwise you should use InstancesByName["ControllerName"].

    This info should be in the API website (ActiveAudioSource), but you'd need to know that ".time" which is Unity API does what you want.

    Note that if you're using Gapless Song Transitions and skip ahead in a song (or change pitch), this may result in the next song playing slightly early or late as it needs to recalculate the start time of the next song and there's no infallible way to calculate this currently with the Unity audio API (math precision is not enough).
     
  13. boolean01

    boolean01

    Joined:
    Nov 16, 2013
    Posts:
    92
    That works perfect, thanks! I had no idea that PlaylistController existed - I thought everything ran though the MasterAudio class, which explains why I couldn't find it.
     
  14. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Yeah, there are some of the PlaylistController things you can do through MasterAudio.cs, otherwise use the PlaylistController class.
     
  15. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    V 3.5.9 has been submitted to the Asset Store. Changelog:

    • Changed max crossfade time from 10 seconds to 120 seconds.
    • Fixed bugs with some music ducking scenarios.
    • Fixed bug: "type in" on EventSounds for Sound Groups wasn't letting you type in.
    • Fixed bug where "Create" button for Master Audio prefab on Master Audio Manager window didn't work.
    • Fixed bug with gapless where re-scheduling an already scheduled song could sometimes result in slight gaps or too early transitions. Now it only reschedules if the track is off its original schedule by more than 1 second, which will never happen unless you change pitch of the song while it's playing or change the position of the song, in which case a warning in logged to the Console to tell you of those possible causes and that gapless might not be so in these cases.
    • Changed "Volume Multiplier" on each Duck Group to "Volume Cut (db)" so it will work more uniformly at any music volume. You will lose all Volume Multiplier settings so check all your Duck Groups! Default Volume Cut is -6db.
    • Added method MasterAudio.ListOfAudioClipsInGroupsEditTime, which gives you a list of audio clip filenames. Only use from edit mode for any custom code you may have there.
    • Added new Playmaker Custom Action MasterAudioGroupIsPlaying.
    • Added new Playmaker Custom Action MasterAudioPlaySoundWithEvent.
    • Added new PropertyDrawer for CustomEvents. Use it by adding the [MasterCustomEvent] Attribute to a public string variable in your custom scripts.
    • Added "MechanimStateCustomEvents" script. You can add this to a state in Mechanim to fire a Custom Event on enter and exit state.
    • Added a property that keeps an up to date list of all Audio Source used by Master Audio (MasterAudio.MasterAudioSources).
    • Added an event you can listen to that notifies if the list of all Audio Sources changes (MasterAudio.NumberOfAudioSourcesChanged += delegate {})
    • Integration with RelationsInspector. New icon on mixer rows and bus rows to show all usages of Sound Group / Bus in Scene in a graph. Finds only references in EventSounds and "MechanimState" scripts in Master Audio.
     
    Last edited: Mar 28, 2016
    Tinjaw likes this.
  16. sevensails

    sevensails

    Joined:
    Aug 22, 2013
    Posts:
    483
    I have a problem with Unity 5.4b12

    Code (csharp):
    1.  
    2.  
    3. ========== OUTPUTING STACK TRACE ==================
    4.  
    5. 0x00D0E3F5 (Secrets of Magic - The Book of ) RuntimeSceneManager::FindSceneByName
    6. 0x00DF21FF (Secrets of Magic - The Book of ) Transform::SetParent
    7. 0x00F17787 (Secrets of Magic - The Book of ) Mesh::GetRuntimeMemorySize
    8. 0x056DF5BF (Mono JIT Code) (wrapper managed-to-native) UnityEngine.Transform:set_parentInternal (UnityEngine.Transform)
    9. 0x056DF577 (Mono JIT Code) UnityEngine.Transform:set_parent (UnityEngine.Transform)
    10. 0x0578DEDD (Mono JIT Code) DarkTonic.MasterAudio.MasterAudio:RemoveSoundGroup (string)
    11. 0x0578DC09 (Mono JIT Code) DarkTonic.MasterAudio.DynamicSoundGroupCreator:RemoveItems ()
    12. 0x0578DB6E (Mono JIT Code) DarkTonic.MasterAudio.DynamicSoundGroupCreator:OnDisable ()
    13. 0x056BE571 (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr)
    14. 0x100F1553 (mono) mono_set_defaults
    15. 0x1005D968 (mono) mono_runtime_invoke
    16. 0x00DE241E (Secrets of Magic - The Book of ) scripting_gchandle_get_target
    17. 0x00E640EA (Secrets of Magic - The Book of ) ScriptingArguments::AddString
    18. 0x00D3F7DE (Secrets of Magic - The Book of ) Object::GetGCHandle
    19. 0x00E6436C (Secrets of Magic - The Book of ) ScriptingArguments::AddString
    20. 0x00DD2E1F (Secrets of Magic - The Book of ) ReportScriptingObjectsTransfer::ReportScriptingObject
    21. 0x00DD57C6 (Secrets of Magic - The Book of ) ReportScriptingObjectsTransfer::ReportScriptingObject
    22. 0x00CCD8F1 (Secrets of Magic - The Book of ) Behaviour::Deactivate
    23. 0x00C4A9B3 (Secrets of Magic - The Book of ) GameObject::ActivateAwakeRecursivelyInternal
    24. 0x00C4ACA7 (Secrets of Magic - The Book of ) GameObject::Deactivate
    25. 0x00E229D3 (Secrets of Magic - The Book of ) GetBuildSettings
    26. 0x00E246CB (Secrets of Magic - The Book of ) DestroyObjectHighLevel
    27. 0x00E3A6A9 (Secrets of Magic - The Book of ) PluginCallbackArray1<enum UnityGfxDeviceEventType>::Invoke
    28. 0x00E625CB (Secrets of Magic - The Book of ) AnimationCurveTpl<float>::GetTypeString
    29. 0x00E62856 (Secrets of Magic - The Book of ) AnimationCurveTpl<float>::GetTypeString
    30. 0x00E6175A (Secrets of Magic - The Book of ) AnimationCurveTpl<float>::GetTypeString
    31. 0x00E3C71C (Secrets of Magic - The Book of ) RectT<int>::Contains
    32. 0x00ED2ECE (Secrets of Magic - The Book of ) PlayerMainWndProc
    33. 0x00ED4F3E (Secrets of Magic - The Book of ) PlayerWinMain
    34. 0x012BFBC8 (Secrets of Magic - The Book of ) Unity::Component::GetClassIDVirtualInternal
    35. 0x012EF069 (Secrets of Magic - The Book of ) Unity::Component::GetClassIDVirtualInternal
    36. 0x77A35CF4 (KERNEL32) BaseThreadInitThunk
    37. 0x77CE6189 (ntdll) RtlIpv6StringToAddressA
    38.  
    39. ========== END OF STACKTRACE ===========
    40.  
    41. **** Crash! ****
    42.  
    The game crashs when entering one scene of my game on StandAlone Player. On Editor Everything works!
    Any advice? Do you think is something MasterAudio related?
     
  17. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    I see
    I see MasterAudio mentioned in there, but the last code mentioned (RemoveSoundGroup) has only normal-looking code in there. Not sure how that could be causing a crash.

    This is also the first crash ever reported, so I doubt it could be Master Audio. You might want to add Debug Statements into the RemoveSoundGroup method between every line and see if you can prove it is Master Audio (some of the Debug's not reached?). If so, I can look into it.
     
  18. sevensails

    sevensails

    Joined:
    Aug 22, 2013
    Posts:
    483
    This seems something new from b12... Reverted to b11 and it seems to be working!

    I will make the change you suggested now to check if is something related to MasterAudio or not.
     
  19. sevensails

    sevensails

    Joined:
    Aug 22, 2013
    Posts:
    483
    Well... Here we are :

    Code (csharp):
    1.  
    2.    Debug.Log("groupTrans.parent = null;");
    3.    groupTrans.parent = null;
    4.    // ReSharper disable once ArrangeStaticMemberQualifier
    5.   Debug.Log("GameObject.Destroy(groupTrans.gameObject);");
    6.   GameObject.Destroy(groupTrans.gameObject);
    7.  
    8.   Debug.Log("RemoveSoundGroupCompleted");
    9.  
    And the crash before it finishing, the Output Log:

    Code (csharp):
    1.  
    2. aSource = aChild.GetComponent<AudioSource>();
    3. (Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
    4.  
    5. aVar = aChild.GetComponent<SoundGroupVariation>();
    6.  
    7. (Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
    8.  
    9. groupTrans.parent = null;
    10.  
    11. (Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
    12.  
    13. Crash!!!
    14.  
    15.  
    Code (csharp):
    1. groupTrans.parent=null;
    Caused the crash.
     
    Last edited: Mar 31, 2016
  20. sevensails

    sevensails

    Joined:
    Aug 22, 2013
    Posts:
    483
    Code (csharp):
    1. groupTrans.parent=null;
    is really necessary?

    After that you do a
    Code (csharp):
    1.  
    2. GameObject.Destroy(groupTrans.gameObject);
    3.  
    I removed the
    Code (csharp):
    1. groupTrans.parent=null;
    line and it works now! Will I have some problem with this?
     
  21. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    I believe it is necessary on some version of Unity. Now there's really not a valid reason that should cause a crash. That's normal Unity code as I said. I'm de-parenting the game object before I destroy it because I think it won't be destroyed otherwise.

    So you can remove that line but I'm not sure it will work as intended. Also not seeing a way to fix that.

    It makes no sense that this line of code works on other platforms either. I think you need to report the bug to Unity.
     
  22. duencil

    duencil

    Joined:
    Dec 17, 2012
    Posts:
    91
    Hi jerotas. Purchased this a while back and just got round to using it today. I've created a few sound groups, which are to be played simply from scripts using the API. Surprisingly though I get one of the sound groups playing each time the game starts. I put a breakpoint in MasterAudio.cs and found its playing something called firstGroupName in order to, according to the comments, pre-warm the code. Is that something I can turn off, or if not how do I set which is considered the first group, so that at least is plays something useful?
     
  23. PeterB

    PeterB

    Joined:
    Nov 3, 2010
    Posts:
    366
    Just installed Master Audio. The first step is of course to install the Master Audio prefab using the Master Audio Manager. However, clicking on the Create button has no effect: nothing at all happens. No error message, no warning, no modification to the Hierarchy.

    Clicking on the other buttons, i.e. for the Playlist Controller prefab, works.

    This is a completely fresh install and nothing has been moved.

    What gives? 5.3.4p1, Mac.

    Ah, never mind. I just found out that you've left two lines commented out. Uncommenting them fixed the issue.
     
    Last edited: Apr 1, 2016
  24. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    It plays the first group *silently* to "pre-warm the code". Nothing is heard so it's not bad. Pre-warming makes sure that the real first sound you play will run as fast as possible and not be latent. Basically looks like some kind of last stage compilation. This was necessary to fix an issue a couple years ago.
     
  25. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Yep, that was it. This has been fixed in the newest version, submitted to the Asset Store earlier this week.
     
    PeterB likes this.
  26. PeterB

    PeterB

    Joined:
    Nov 3, 2010
    Posts:
    366
    A best practice question: I'm using a shuffled Playlist as a jukebox in a lobby scene. The Master Audio gameobject is set to persistent, to make it survive the transition to the game scene. What's the best way of fading out the music as the new scene has loaded? Previously I've used OnLevelWasLoaded in discrete code, all of which I'm tearing out to replace it with Master Audio.
     
  27. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    No reason to write code :)

    Pick any game object that is in your new Scene and add EventSounds to it with settings like these.
    upload_2016-4-1_14-55-4.png
     
    PeterB likes this.
  28. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Attention! Optional, efficient audio occlusion is coming in the next version of Master Audio. Like the auto-prioritization feature, you will be able to choose the time interval at which each actively playing AudioSource checks for occlusion. Only those where the AudioListener is closer than the AudioSource's max distance will be line casted. Occlusion will apply more low pass filter the further the Listener is from the blockage.

    Just tested it on our next game Legends of the Brawl and it works killer without affecting frame rate much at all!
     
  29. Tiny-Tree

    Tiny-Tree

    Joined:
    Dec 26, 2012
    Posts:
    1,315
    audio occlusion like we cant here throught a wall ? that would be great. does it require lot of changes on current audio prefabs?
     
  30. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Correct. There's even an optional layermask if you only want collisions with certain layers to be considered blocked. In it's simplest mode, you just turn on Occlusion for "all groups" with a global switch in Advanced Settings. Re-scanning for occlusion will happen with default settings by doing a line cast every 0.2 seconds (but you can choose any .1 increment up to 1 second), and occur with a hit to any collider or trigger in any layer. It also contains code to automatically stagger the line casts so that they don't all happen on the same frame if you have set up say 20 ambient sounds in the Scene that all start at the same time.

    You won't need to change anything else unless your placement of audio emitters needs you to move colliders to escape line casts.
     
  31. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Here's a screen shot of the Occlusion controls coming in the next update! Fully tweakable and light on performance. You can click on the colored buttons to select the Audio Sources in question.

    occlusion.PNG
     
    Tinjaw, TonyLi and Tiny-Tree like this.
  32. sevensails

    sevensails

    Joined:
    Aug 22, 2013
    Posts:
    483
    I'm using DynamicSoundGroupCreator and I'm facing a Problem of no sound being played if I restart the same level.

    Ex... I'm on level "GamePlay", if I change to any other level it works, but if I reload the "GamePlay" level the sound does not works anymore.... but is not 100% of time, sometimes it works...

    Is there any tip of how to fix this?
     
  33. Tiny-Tree

    Tiny-Tree

    Joined:
    Dec 26, 2012
    Posts:
    1,315
    force to 2d maybe the group ? i had same problem yesterday and it was that.
    also if you reload a scene and in same time play a sound you need to have the sound master as persistent else they will be destroyed before playing
     
  34. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    I'll need more details before I try to reproduce this. Ultimately, please read the "official bug reporting rules" stickied thread on our forum and send me an example project that demonstrates this.
     
  35. sevensails

    sevensails

    Joined:
    Aug 22, 2013
    Posts:
    483
    Sorry... I tried to reproduce on a empty project, and it worked!

    But... On my current project, each 2 reloads, 1 work and other does not work.

    I fixed my problem here disabling "Auto Remove Items" before reloading the current Scene. I think does not make sense Remove All SoungGroups to Reload the Same Sound Groups Again. Maybe this should be the default behavior when reloading the same scene?

    Please let me know If I can help track this problem any other way.

    Thanks
     
  36. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    That's usually what happens. People try to make a simple project and can't reproduce it, then they figure out what the difference is.

    I don't think you want to uncheck "Auto Remove Items" because those audio items would permanently remain in the Master Audio game object when you load a *different* Scene, if ever.

    Are you using a persistent MA game object, or a new one for each Scene? I'd hope you add more to the new project so you can reproduce it and send to me.
     
  37. Shadeless

    Shadeless

    Joined:
    Jul 22, 2013
    Posts:
    136
    Can this please be made to work with 2D Colliders as well? Shouldn't be difficult right? I'm using 3D audio sources in a 2D game, so this would be nice.
    And release it already!!! xD

    Cheers
     
  38. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Does a normal Raycast hit 2D colliders or not? If so, this already works.
     
  39. Shadeless

    Shadeless

    Joined:
    Jul 22, 2013
    Posts:
    136
    Physics.Raycast only works on 3D Colliders, Physics2D.Raycast works on 2D Colliders.
    So I guess you'd just have to let the user specify 3D or 2D and use the functions accordingly. Should be easy.

    Cheers
     
  40. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Unfortunately no. Physics2D.Raycast doesn't have the ability to return a RaycastHit object, so we wouldn't be able to calculate the occlusion rolloff frequency based on the ratio of the blocker between Audio Source and Audio Listener. We would only know whether a hit occurred or not, but not where the hit occurred.

    So for now, 2D raycast is off the table. That seems not flexible enough to add in the future either. A fixed occlusion rolloff that doesn't care about distance of blocker wouldn't be very usable or useful.
     
  41. Shadeless

    Shadeless

    Joined:
    Jul 22, 2013
    Posts:
    136
    Physics2D.Raycast returns a RaycastHit2D object.
    http://docs.unity3d.com/ScriptReference/RaycastHit2D.html
    So you have data of the distance, fraction, normal, point in 2D space.

    Of course this feature would be useful in 2D games which want to use 3D sounds but in 2D space.
    It can even be as simple as lowering the volume of the sound by a certain amount based on the distance if 2D mode is selected.
     
  42. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    I'll take a look again tomorrow then, thanks! It's not a "ref" parameter like the old Physics one.
     
  43. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Now added Raycast Mode dropdown to Occlusion settings! Default of Physics3D but Physics2D is also available!
     
  44. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Occlusion probably won't be released for a couple weeks, we are now getting everything in shape for Master Audio v4.0, it's a major release.
     
    Tinjaw likes this.
  45. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Here's the new video showing Occlusion!

     
    chelnok likes this.
  46. Shadeless

    Shadeless

    Joined:
    Jul 22, 2013
    Posts:
    136
    Man that's great to hear I can't wait for the release!! Hurry it upp! :p

    Cheers!
     
  47. Ramsdal

    Ramsdal

    Joined:
    Oct 18, 2013
    Posts:
    251
    Hi, I would like to know if there is any pre constructed way to handle different volume depending on impact force? In my example I would like to play an impact sound when something is hit, however if something is just "touched" by the same object I also want to play an audio clip but with lower volume.

    I am guessing I can just do the script myself by looking on the "collision.relativeVelocity" or something to that effect. And then adjust the volume to play before telling MA to play a random variation through scripting and not the EventSounds. Is that a way to do it or is there something prebuilt?
     
  48. Ramsdal

    Ramsdal

    Joined:
    Oct 18, 2013
    Posts:
    251
    Just tested it out, and seems to be working fin by basically doing what I mentioned above, but if there is any built in way to do this please let me know :)
     
  49. Tinjaw

    Tinjaw

    Joined:
    Jan 9, 2014
    Posts:
    518
    Why would occlusion not be available?

    Unity v 5.3.4f1
    Master Audio v 3.5.9

     
  50. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Because it's in the next update, not in the one on the Asset Store. Hope to submit Monday.