Ejemplo n.º 1
0
 private float GetShownVolume()
 {
     if (audioMixerSaver == null)
     {
         return(0);
     }
     if (audioMixerSaver.GetMuted(channelType))
     {
         return(AudioMixerSaver.MIN_VOLUME);
     }
     else
     {
         return(audioMixerSaver.GetVolume(channelType));
     }
 }
Ejemplo n.º 2
0
    private void DrawChannel(string label, AudioMixerSaver.ChannelType channelType)
    {
        EditorGUILayout.Space();
        EditorGUILayout.LabelField(label);


        EditorGUI.BeginChangeCheck();

        var muted  = EditorGUILayout.Toggle("Muted", audioMixerSaves.GetMuted(channelType));
        var volume = EditorGUILayout.FloatField("Db Boost", audioMixerSaves.GetVolume(channelType));


        if (EditorGUI.EndChangeCheck())
        {
            audioMixerSaves.SetMuted(channelType, muted);
            audioMixerSaves.SetVolume(channelType, volume);
        }
    }
Ejemplo n.º 3
0
 private void Awake()
 {
     toggle.onValueChanged.AddListener(Mute);
     toggle.isOn = checkedMeansMuted ? mixerSaver.GetMuted(channelType) : !mixerSaver.GetMuted(channelType);
 }