modny
New Member
Posts: 5
Posts: 5
|
Post by modny on Dec 27, 2019 11:37:58 GMT
hi.
I've got dsgc from the AssetBundle.
So, MasterAudio - Groupcontrol contains my sound list.
I thought I could call it MasterAudio.PlaySound, but it didn't play.
What more should I do here in script?
Thank you.
|
|
|
Post by DarkTonic Dev on Dec 27, 2019 16:31:56 GMT
All the info I have on Asset Bundles is in the documentation here: www.dtdevtools.com/docs/masteraudio/AssetBundles.htmI don't use them and most of that info was provided by a user of Master Audio, but I've confirmed that it works. If you put an actual DSGC in your bundle, then you will need to instantiate the DSGC. After that, you will be able to play the sounds.
|
|
modny
New Member
Posts: 5
Posts: 5
|
Post by modny on Dec 29, 2019 2:14:04 GMT
Thank you. I make to instantiate the DSGC. After that, I did MasterAudio.PlaySound(soundname) and it doesn't work. Is there anything else you need to do after the tutorial?
|
|
|
Post by DarkTonic Dev on Dec 29, 2019 3:12:15 GMT
No, simple as that. If it didn't play, you can first confirm that the Sound Group exists in the Master Audio game object. Does it?
All Sound Groups should be transferred from the DSGC as soon as it becomes active.
|
|
modny
New Member
Posts: 5
Posts: 5
|
Post by modny on Dec 29, 2019 5:52:12 GMT
Thank you for your reply. After Instantiate dsgc, the music is added to MasterAudio-GroupControl. Press the Play button on the inspector to get the music. I do MasterAudio.PlaySound in the script, the music won't come out. But the inspector marks "1". Is there any problem you might think of?
|
|
|
Post by DarkTonic Dev on Dec 29, 2019 18:55:01 GMT
I dont understand your last comment. Screenshot?
|
|
modny
New Member
Posts: 5
Posts: 5
|
Post by modny on Dec 30, 2019 4:46:40 GMT
imgur.com/OvnZPBaI do MasterAudio.PlaySound in the script, the music won't come out. But the inspector marks "1". Is there a suspected problem?
|
|
|
Post by DarkTonic Dev on Dec 30, 2019 16:16:15 GMT
So if you don't see any error in the console when it marks it as one then I suspect it's too far away to hear. Try playing it as a 2d sound and see if you can hear it.
|
|
modny
New Member
Posts: 5
Posts: 5
|
Post by modny on Dec 31, 2019 2:29:32 GMT
It's solved by switching from Force All to 3D to 2D. MasterAudio is the best. Thank you.
|
|
|
Post by DarkTonic Dev on Dec 31, 2019 5:30:09 GMT
Ok, so then the problem is that it was too far away from the Audio Listener to be audible. If you didn't really want 2d sound, then switch back and adjust the Audio Source template (or make your own) and apply it to the Sound Group with a much shorter Max Distance.
I also wanted to mention, since it's related, that I'm finishing up Addressable support for Master Audio. It should be ready in a week or 2. That means you will no longer need to write code to load Asset Bundles if you mark the assets as Addressable. It's a new "Audio Origin" to go along with Resource Files and Audio Clips. Resource Files can also be marked as Addressable but we will keep the Resource File mode for backward compatibility for awhile.
It's taken me about a month to get this done on Addressables and it was pretty difficult due to lack of documentation.
|
|