示例#1
0
    public void ChangeValue(SoundChannel pGroup, float pValue)
    {
        string channel = pGroup.ToString();

        _masterMixer.SetFloat(channel, pValue);
        PlayerPrefs.SetFloat(channel, pValue);
    }
示例#2
0
    float GetSavedValue(SoundChannel pGroup)
    {
        string channel = pGroup.ToString();

        if (PlayerPrefs.HasKey(channel))
        {
            return(PlayerPrefs.GetFloat(channel));
        }
        else
        {
            return(1);
        }
    }