syaoran
New Member
Posts: 1
Posts: 1
|
Post by syaoran on Jan 16, 2020 10:00:09 GMT
Hi,
in DynamicSoundGroupCreator.cs
var aud = GetComponent<AudioSource>(); if (aud != null) { Destroy(aud); }
in MasterAudio.cs var listener = ListenerTrans; if (listener != null) { var aud = listener.GetComponent<AudioSource>(); if (aud != null) { // delete the previewer // ReSharper disable once ArrangeStaticMemberQualifier GameObject.Destroy(aud); } }
Don't know why to delete AudioSource Component? I want Step by step Replace unity playaduio with Master Audio: AAA Sound. But after Master Audio auto delete AudioSource Component, error on start play: MissingReferenceException: The object of type 'AudioSource' has been destroyed but you are still trying to access it.
Could you do me a favor.
Thank you.
|
|
|
Post by DarkTonic Dev on Jan 16, 2020 17:33:19 GMT
Those Audio Sources that are deleted on startup are the ones created purely for previewing in edit mode. We destroy them in case they still host an Audio Clip, so you won't be taking up extra audio memory. Step by step to play a sound, go through the Quick Starts on the documentation website. It doesn't talk about "playAudio" but it does tell you how to play sounds. So you can delete your Audio Sources. www.dtdevtools.com/docs/masteraudio/TOC.htm
|
|