//! Applies global settings.
 public void ApplySettings()
 {
     if ((int)graphicsQuality != 999)
     {
         QualitySettings.SetQualityLevel((int)graphicsQuality, true);
         PlayerPrefsX.SetPersistentBool("changedGraphicsQuality", true);
     }
     PlayerPrefs.SetInt("graphicsQuality", (int)graphicsQuality);
     PlayerPrefsX.SetPersistentBool("mouseInverted", GetComponent <MSCameraController>().CameraSettings.firstPerson.invertYInput);
     PlayerPrefs.SetFloat("xSensitivity", GetComponent <MSCameraController>().CameraSettings.firstPerson.sensibilityX);
     PlayerPrefs.SetFloat("ySensitivity", GetComponent <MSCameraController>().CameraSettings.firstPerson.sensibilityY);
     PlayerPrefs.SetFloat("FOV", mCam.fieldOfView);
     PlayerPrefs.SetFloat("drawDistance", mCam.farClipPlane);
     PlayerPrefs.SetFloat("volume", GetComponent <MSCameraController>().cameras[0].volume);
     PlayerPrefsX.SetPersistentBool("blockPhysics", gameManager.blockPhysics);
     PlayerPrefsX.SetPersistentBool("hazardsEnabled", gameManager.hazardsEnabled);
     PlayerPrefsX.SetPersistentBool("fogEnabled", RenderSettings.fog);
     PlayerPrefs.SetFloat("fogDensity", RenderSettings.fogDensity);
     PlayerPrefs.SetInt("chunkSize", gameManager.chunkSize);
     PlayerPrefs.SetFloat("simulationSpeed", gameManager.simulationSpeed);
     PlayerPrefs.SetInt("defaultRange", defaultRange);
     PlayerPrefs.SetInt("vSyncCount", QualitySettings.vSyncCount);
     PlayerPrefs.Save();
 }