You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is currently no easy way to make JSAM's Audio Manager manage your own Audio Source. I'll be working on adding a solution for this in the next update.
I apologize for the long wait, but if if you still need help on this issue, what you can do is create a script that hooks onto the AudioManager's volume change events and changes an AudioSource's volume level automatically. Something like the below.
public class ManagedSource : MonoBehaviour
{
public float relativeVolume;
public AudioSource source;
private void Start()
{
AudioManager.OnSoundVolumeChanged += UpdateVolume;
}
private void OnDestroy()
{
AudioManager.OnSoundVolumeChanged -= UpdateVolume;
}
void UpdateVolume(float v)
{
source.volume = relativeVolume * v * AudioManager.MasterVolume;
}
}
JSAM Version: 3.0.0 preview 6
Unity: 2021.3.21f1
How do we make sure the mixer works for a audio source not managed by JSAM?
The text was updated successfully, but these errors were encountered: