public void LoadFromPersistence() { volumeSlider.value = PlayerPrefsWrapper.GetMasterVolumeOrDefault(0.8f); difficultySlider.value = PlayerPrefsWrapper.GetDifficulty(); Debug.Log("Loaded options from persistence. Vol: " + PlayerPrefsWrapper.GetMasterVolumeOrDefault(0.8f)); }
// Use this for initialization void Start() { Debug.Log("Difficulty: " + PlayerPrefsWrapper.GetDifficulty()); Debug.Log("Master Volume: " + PlayerPrefsWrapper.GetMasterVolumeOrDefault(0.8f)); }
void Start() { MusicPlayer musicPlayer = GameObject.FindObjectOfType <MusicPlayer>(); musicPlayer.SetVolume(PlayerPrefsWrapper.GetMasterVolumeOrDefault(0.8f)); }