private void OnToggleValueChanged(bool isOn) { switch (audioType) { case AudioType.Music: AudioClipPlayer.MuteMusic(isOn); break; case AudioType.Sfx: AudioClipPlayer.MuteSfx(isOn); break; default: throw new ArgumentOutOfRangeException(); } AudioClipPlayer.PlayButton(); PlayerSettings.Save(); }
private static void OnClick() { AudioClipPlayer.PlayButton(); }