Beispiel #1
0
 void Awake()
 {
     ////for music on/off
     if (PlayerPrefs.GetInt("Music", 0) == 0)
     {
         AudioListener.volume = 1;
         MusicOn.gameObject.SetActive(true);
         MusicOff.gameObject.SetActive(false);
     }
     else
     {
         AudioListener.volume = 0;
         MusicOn.gameObject.SetActive(false);
         MusicOff.gameObject.SetActive(true);
     }
     ///for checking quality-settings
     if (PlayerPrefs.GetInt("Quality", 0) == 0)
     {
         HighGraphics.SetActive(true);
         LowGraphics.SetActive(false);
         QualitySettings.SetQualityLevel(6);
     }
     else
     {
         HighGraphics.SetActive(false);
         LowGraphics.SetActive(true);
         QualitySettings.SetQualityLevel(5);
     }
 }
Beispiel #2
0
 public void ChangeQuality()
 {
     if (PlayerPrefs.GetInt("Quality", 0) == 0)
     {
         HighGraphics.SetActive(false);
         LowGraphics.SetActive(true);
         PlayerPrefs.SetInt("Quality", 1);
         QualitySettings.SetQualityLevel(5);
     }
     else
     {
         HighGraphics.SetActive(true);
         LowGraphics.SetActive(false);
         PlayerPrefs.SetInt("Quality", 0);
         QualitySettings.SetQualityLevel(6);
     }
 }