Hi, I’m creating a browser game and I have a problem with sound. While the game is displaying video ad, the game audio should be muted, I created a separate function for this, which works in the editor, but does not work at all in the finished WebGL build, anyone have an idea why?
public void OnAdRequested()
{
mainMixer.SetFloat("masterVolume", -80f);
Debug.Log("OnAdRequested()");
}
public void OnAdCompleted()
{
if (playMusic || playSound) mainMixer.SetFloat("masterVolume", 0f);
Debug.Log("OnAdCompleted()");
}
Interestingly, the code is invoked correctly, as I checked in the browser console. All references are set correctly, I really have no idea what could be wrong anymore.
Unity Version: 2022.3.12f1
