public void Load() { if (saved == null) { var key = mixer.name + "." + parameterName; // mixer.GetFloat( parameterName, out this.defaultValue ); saved = PlayerPrefsValue.Float(key, defaultValue); } // UNITY_BUG : does not works on Awake() or OnEnable(). mixer.SetFloat(parameterName, saved.value); }
private void Load() { saved = PlayerPrefsValue.Bool(preferenceName, initialValue); }