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. BTStone

    BTStone

    Joined:
    Mar 10, 2012
    Posts:
    1,422
    Ok, but what exactly changes? If I make a prefab of the Vanilla GO with the DGSC as a component at the root of the Vanilla GO and then go into prefab mode I still have the problem that I cant add/remove groups or do I misunderstand something?
     
  2. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Prefab mode is a no go. Just work with the game object normally when editing DGSC and apply changes to affect the other instances of it (if any) with the "apply changes" button. It's been this way since forever.
     
    BTStone likes this.
  3. nicknick_

    nicknick_

    Joined:
    Mar 31, 2017
    Posts:
    11
    Hi there,
    I have a bit of a beginner´s question codingwise:
    I use the provided Playmaker actions and wanted to modify a version of the "Master Audio Play Sound With Event" action to additionally return the played ActingVariation as FSM object.
    So I created a public FSM var of type SoundGroupVariation and created one in Playmaker as well:
    upload_2023-4-18_20-34-18.png

    upload_2023-4-18_20-32-56.png

    Then I simply added the sound variation code to the existing code of the provided action:

    upload_2023-4-18_20-35-31.png

    But I´m getting a NullReferenceException at those exact lines. Obviously I´m not yet too familiar with coding, but maybe you can give me a hint? :)
     
  4. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Let me first ask: what do you want the SoundGroupVariation for? Because you can probably do whatever you want without it, with all the methods available in the API together with Playmaker actions.
     
  5. nicknick_

    nicknick_

    Joined:
    Mar 31, 2017
    Posts:
    11
    Wow, thank you for the quick answer!

    I want the played SoundGroupVariation to get the Clip Id, which I´d use for really basic subtitles.

    EDIT:

    Of course it would be easier to directly return the clip id string for the action (I should really learn to code haha), but yeah, I´m a bit clueless rn
     
    Last edited: Apr 18, 2023
  6. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Oh ok. Well the issue is that ActingVariation will be null if the sound doesn't play. And there are at least a dozen reasons why it won't play, as illustrated by the logic chart on this page:

    https://www.dtdevtools.com/docs/masteraudio/Troubleshooting.htm

    Aside from that, your code should work. Well, if you're getting a NullReferenceException, which object is null? soundVariation or sound?
     
  7. nicknick_

    nicknick_

    Joined:
    Mar 31, 2017
    Posts:
    11
    Ah, ok!
    I´m getting the Nullref for the soundVariation.
    At first the modified action worked, those NullRefs seemed to randomly occur, and now I´m getting them everytime somehow.

    Well, if I´m using the action without any of my modifications, the sounds seem to always play correctly.
     
  8. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    if soundVariation is null, it's probably not initialized and null. You never set it and are trying to set its value (my guess). I don't recall exactly how that class works since it's a Playmaker specific thing. You should probably ask on the Playmaker forum if you can't find the info online.

    -B
     
    nicknick_ likes this.
  9. nicknick_

    nicknick_

    Joined:
    Mar 31, 2017
    Posts:
    11
    Thank you, will do that!

    Additionally, is there a way to directly get the clip id name as a string?
     
  10. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    What do you mean by clip id? The name of the game object for the Variation? Or something else?
     
  11. nicknick_

    nicknick_

    Joined:
    Mar 31, 2017
    Posts:
    11
    Ah, in code it´s the ActingVariation.clipAlias (named clip id in the inspector of the sound group variation)

    I now directly get the clipAlias string and return it with a public FSMstring.

    What I previously missed was to reset the variable in the playmaker action´s Reset().
    At first it really does work, but after a while I´m still getting the same nullref error for this variable.
    It´s really strange, because looking at similar actions it seems to all be correct.
     
  12. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Yes, the reset should fix it. Ok the alias. I'm not sure of anything else you need to do with the FsmObject though.
     
  13. nicknick_

    nicknick_

    Joined:
    Mar 31, 2017
    Posts:
    11
    Thanks so much for your help!

    It seems that the error only occurs, when there are multiple objects playing sounds during the same time while another sound is playing. Increasing the max voices allowed per sound helped, but the error still occurs sometimes, which is really strange.
    Anyways, thank you again! Probably should just find another solution for very simple subtitles :)
     
  14. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    If that's the case, it's not playing sometimes, and you just need to add a null check so you don't get any exceptions.

    You're welcome.
     
    nicknick_ likes this.
  15. BTStone

    BTStone

    Joined:
    Mar 10, 2012
    Posts:
    1,422
    Heyo @jerotas,
    is it safe to update Unity to 2022.2.X? Is the latest MasterAudio version compatible with the 2022 Tech stream? :)
     
  16. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Yes. Although you should probably keep your old version of Unity just in case something else breaks. I have 4 versions installed myself.
     
    BTStone likes this.
  17. HypnotistDK

    HypnotistDK

    Joined:
    Feb 14, 2016
    Posts:
    15
    Are you getting it to work with photon fusion?
     
  18. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Wasn't planning on it. I don't even see it on the Asset Store. Do you have more information for me?
     
  19. HypnotistDK

    HypnotistDK

    Joined:
    Feb 14, 2016
    Posts:
    15
    It's the new network solution from photon that will take over from PUN2, they have demo's on the store. Plenty of people are startet to use it and active on discord server and it works really well.

    Fusion Karts Multiplay
    Fusion Tanknarok Multiplayer
    Fusion Dragonhunters VR Multiplayer

    https://www.photonengine.com/fusion
    https://doc.photonengine.com/fusion...ed/fusion-intro#pun__bolt___fusion_comparison
    https://doc.photonengine.com/fusion/current/getting-started/coming-from-pun
     
  20. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Ok, is there a guide on how to migrate from old PUN to Fusion?
     
  21. HypnotistDK

    HypnotistDK

    Joined:
    Feb 14, 2016
    Posts:
    15
  22. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    HypnotistDK likes this.
  23. Yodzilla

    Yodzilla

    Joined:
    Mar 21, 2013
    Posts:
    48
    I'm messing with Dynamic Sound Group Creators for the first time and I'm not sure the best way to handle what I'm trying to do. I'd like there to be a list of default sounds that my game uses but on a case-by-case basis I'd load in a Dynamic Sound Group Creator that would override a subset of those sounds. It looks like there's no way for a Dynamic Sound Group Creator to actually override sound groups in the default Master Audio object. Would the way to do this be to put ALL sounds into a Dynamic Sound Group Creator, have that in a scene by default, and then instantiate another smaller one to take priority over the original sound groups?
     
  24. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    DSGC can't "override", it only can create.

    So basically for each "sound skin" you will need a different DSGC.
    If you want default sounds without those from any character (or whatever the deciding factor is), you would need a "default DSGC". As long as you only enable one of the DGSC's that has same-named Sound Groups in it, there will be no issue.
     
  25. Yodzilla

    Yodzilla

    Joined:
    Mar 21, 2013
    Posts:
    48
    Ah okay, thanks for the clarification!
     
    jerotas likes this.
  26. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    No problem. To elaborate, yes you had the right idea.

    Would the way to do this be to put ALL sounds into a Dynamic Sound Group Creator, have that in a scene by default, and then instantiate another smaller one to take priority over the original sound groups?

    You could do that, just make sure to disable the default one before enabling the other one.
     
  27. Yodzilla

    Yodzilla

    Joined:
    Mar 21, 2013
    Posts:
    48
    Apologies for needing help again so soon but I've run into something strange that I've never experienced before. We integrated Master Audio into our project which is a mobile game for iOS and Android. Everything was working fine until we built in MacOS. Just to be clear, not as the target platform but building in Unity on a Mac as opposed to a Windows machine. I'm getting this error which then cascades into other errors and stops the build from completing

    Library/Bee/artifacts/900b0aP.dag/RIScripts.dll failed to produce updates.txt file


    There seems to be something about the RelationsInspector plugin that ships with Master Audio that Unity in MacOS doesn't like and I'm at a loss as to what that could be. Searching for other errors of this nature regarding Bee (which is apparently a build tool that's part of the Unity Editor pipeline) returns "fixes" that say to make sure there are no spaces in any file paths and to just delete the Library folder and let Unity reimport. I've made sure of the former and tried the latter and neither fixed it. I even tried moving to a newer version of Unity and the problem persisted. Seen in 2021.3.22 and 2022.3.2. Do you have any ideas what might be going on here? Does RelationsInspector need to be part of the project?
     
  28. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    I longer have a Mac so I can't test this. I didn't author RI either so I'm not sure.

    RelationsInspector has a few references in the Inspector scripts, so if it's deleted, those will need to be changed.

    You could try that and let me know if it works without. If so, I could make a way to turn RI off in the Welcome Window.

    -Brian
     
  29. Yodzilla

    Yodzilla

    Joined:
    Mar 21, 2013
    Posts:
    48
    Okay, I'm not having much luck with this. If I delete the two RelationsInspector folders that come with Master Audio I then need to comment out their references in DTGUIHelper (line 1506) and MasterAudioInspector (lines 2667 and 3340). At this point I can play in the editor just fine and am hearing audio as expected. It seems to be working.

    However when I try to make any builds now it completely blows up with a TON of new errors. I'm not sure what's causing this as all references to RelationsInspector have been removed from the project. Here's what I'm seeing on build:

    upload_2023-6-16_13-16-30.png

    If I click on any of those errors and check the code everything is fine. Like I said, it plays in the editor in this state but building is a problem for some reason.
     
  30. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    As I said, I can't build to Mac because I don't have a Mac. I can try deleting and commenting out RI code and building to PC, to see if I see any errors.

    Worth a shot? Those errors shouldn't be occurring because editor scripts are only used inside Unity editor, not on target platforms when exporting.
     
  31. Yodzilla

    Yodzilla

    Joined:
    Mar 21, 2013
    Posts:
    48
    The above steps and errors were done on a Windows machine which is where I do my primary dev. All of our CI tools and build pipeline are in Mac though which is what kicked this whole thing off as it was working for me but then not in CI. You should see the same errors above in Windows if you follow those steps. As soon as I’m back at my desk I’ll confirm it in a new project with just MA installed too.
     
    jerotas likes this.
  32. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Negative. Tried on Unity 2021.3.22. Deleted the 2 RelationsInspector folders, and commented out the following that wasn't compiling.

    upload_2023-6-16_12-39-7.png

    Then I was able to build + run for Windows with no issues, using an Example Scene included with the package.
     
  33. Yodzilla

    Yodzilla

    Joined:
    Mar 21, 2013
    Posts:
    48
    I FIGURED IT OUT!!

    It was the ASMDEF files that are bundled with the Master Audio plugin. The ASMDEF files MAEditor, RIEditor, and RIScripts by default are set to Any Platform when they need to be just Editor. This can even be seen in a new project once you import Master Audio, unpack ma_asmdefs, and then try to make a build for Android. It'll run in the editor but if at build time it blows up and looks like this:

    upload_2023-6-16_14-41-1.png

    Once you set the three ASMDEF files above to editor only it works just fine! They need to be like this:

    upload_2023-6-16_14-40-41.png

    So it's up to you what you want to do since it's your plugin but I'd recommend making those changes in the asmdef packages for a future update. Let me know if you have any questions and thanks for your help!
     
  34. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Glad it's working. I hate asmdef files.

    By the way, I've had the asmdef files like how you're proposing before, and had to switch them back because of other errors. So there's probably no way to have them work in all cases. They're fairly problematic, so that's why I don't include them installed by default.

    I would urge you to not use them if it's possible. No benefit for my projects. It was a good idea, but too many issues.
     
  35. Yodzilla

    Yodzilla

    Joined:
    Mar 21, 2013
    Posts:
    48
    I hate ASMDEF files with a burning passion but my boss has them in here for "reasons" so I don't have much of a say right now. I think he's coming around to how awful they are so hopefully they go away forever soon.
     
  36. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Ha nice!

    Tell him the author of Master Audio with 12 years of Unity experience and 30 years in programming says they're terrible :p
     
  37. RandomCharacters

    RandomCharacters

    Joined:
    Nov 29, 2012
    Posts:
    262
    I just upgraded to new version. The old version gives console errors with one of the files. I'm sure this answer is somewhere but i can't find it. To upgrade, is it as easy as deleting the old files and importing the new package? Will the new version understand and pop right in? What I mean is after doing the install, will all the script still work and the scenes play fine?
     
  38. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Yes they will. Here's the standard procedure when in place updating doesn't work.

    1) Find and delete all the DarkTonic folders in Project View.
    2) Restart Unity.
    3) Import new version.

    If however you use other DarkTonic plugins such as Pool Boss or CoreGameKit, you will also need to reinstall those.
     
  39. RandomCharacters

    RandomCharacters

    Joined:
    Nov 29, 2012
    Posts:
    262
    In unity 2023.1.3, master Audio gives about 50 warnings in the console. I am assuming you will get t fixing these at some point? It just drowns out everything else.
     
    Last edited: Jul 5, 2023
  40. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Thanks for letting me know. I'm installing that version now and will get an update done ASAP. I'll report back. I assume you meant Unity 2022.3.3, right?
     
  41. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    I'm guessing 2023. In 2023, Unity deprecated FindObjectOfType<T> and FindObjectsOfType<T>. We recently submitted similar updates to conditionally use FindFirstObjectByType<T> and FindObjectsByType<T> in 2023+ in Pixel Crushers assets.
     
  42. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Thanks Tony! I'll take a look in both.
     
  43. RandomCharacters

    RandomCharacters

    Joined:
    Nov 29, 2012
    Posts:
    262
    the latest starting with 2023.1.1 and 2023.1.3f1
     
    jerotas likes this.
  44. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    V 1.0.5 is released! Changelog:

    • Fixed compile warnings in Unity 2023.
     
  45. RandomCharacters

    RandomCharacters

    Joined:
    Nov 29, 2012
    Posts:
    262
    I have tons of these errors in every project. They come from other plugins like TextFX. Unfortunately, most of those assests are depreciated. I still use them because they are good assets. So I was wondering, where you changed this (and in Master Audio as well), was it as simple as changing the text by those few characters? or did you have to change other code in other lines as well? What I mean is that sometimes other lines of code are dependent, so they have to be changed as well.

    An example would be:
    TextFxNative[] objects = GameObject.FindObjectsOfType(typeof(TextFxNative)) as TextFxNative[];
     
    Last edited: Jul 8, 2023
  46. spikezart

    spikezart

    Joined:
    Oct 28, 2021
    Posts:
    72
    Hey there. Quick question: can Master Audio add more than one playlist to a scene ? ie, when a player character enters a defined area a new playlist over-rides existing playlist or just begins playing ?
     
  47. spikezart

    spikezart

    Joined:
    Oct 28, 2021
    Posts:
    72
    No one here supporting this asset?
     
  48. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    @jerotas is usually very quick to reply. Maybe the forum software failed to send him a notification.
     
    jerotas, spikezart and hopeful like this.
  49. RandomCharacters

    RandomCharacters

    Joined:
    Nov 29, 2012
    Posts:
    262
    this is the most supported asest on the store. what you talking about Willas?
     
  50. spikezart

    spikezart

    Joined:
    Oct 28, 2021
    Posts:
    72
    Hey there. Quick question: can Master Audio add more than one playlist to a scene ? ie, when a player character enters a defined area a new playlist over-rides existing playlist or just begins playing ?