Exemplo n.º 1
0
    void LoadSettings()
    {
        UserData.Settings.SettingsData settings = UserData.Settings.LoadSettings();

        if (settings.musicVolume == 0)
        {
            mixer.SetFloat("Music", -80f);
        }
        else
        {
            mixer.SetFloat("Music", Mathf.Log(settings.musicVolume) * 20);
        }
    }
Exemplo n.º 2
0
    void LoadSettings()
    {
        UserData.Settings.SettingsData settings = UserData.Settings.LoadSettings();

        if (settings.musicVolume == 0)
        {
            audioSource.mute = true;
        }
        else
        {
            target = settings.musicVolume;
        }
    }