2D Toolkit Forum

2D Toolkit => Support => Topic started by: bochicoine on November 11, 2013, 10:42:43 am

Title: AudioListener.volume
Post by: bochicoine on November 11, 2013, 10:42:43 am
Apparently we need to update "tk2dAudioManager.cs" at line 65:

Code: [Select]
audioSrc.PlayOneShot(clip);
to:

Code: [Select]
audioSrc.PlayOneShot(clip, AudioListener.volume);
The reason I found this issue was I noticed that the volume of sounds on a button click (tk2dUISoundItem)  were not adjusting properly with my volume slider, even though the AudioListener.volume was changing. Found the fix via this link:

http://forum.unity3d.com/threads/192150-In-Unity-4-2-the-AudioSource-PlayOneTime-is-ignoring-AudioListener-volume (http://forum.unity3d.com/threads/192150-In-Unity-4-2-the-AudioSource-PlayOneTime-is-ignoring-AudioListener-volume)
Title: Re: AudioListener.volume
Post by: unikronsoftware on November 11, 2013, 10:54:32 am
Ok thanks for that I'll add it to the codebase.