private void Start() { if (PlayerPrefs.HasKey("SoundValue")) { soundValue.value = PlayerPrefs.GetFloat("SoundValue"); foreach (AudioSource value in audioSources) { value.volume = soundValue.value; } } else { PlayerPrefs.SetFloat("SoundValue", 0.5f); soundValue.value = PlayerPrefs.GetFloat("SoundValue"); foreach (AudioSource value in audioSources) { value.volume = soundValue.value; } } if (PlayerPrefs.HasKey("Fisheye_En")) { k = PlayerPrefs.GetInt("Fisheye_En"); } else { k = 1; } if (PlayerPrefs.HasKey("Bloom_En")) { i = PlayerPrefs.GetInt("Bloom_En"); } else { i = 1; } if (PlayerPrefs.HasKey("ValueSliderSpeedPrinting")) { speedPrintingSlider.value = PlayerPrefs.GetInt("ValueSliderSpeedPrinting"); } else { speedPrintingSlider.value = 1; PlayerPrefs.SetInt("ValueSliderSpeedPrinting", (int)speedDeletingSlider.value); } if (PlayerPrefs.HasKey("ValueSliderSpeedDeleting")) { speedDeletingSlider.value = PlayerPrefs.GetInt("ValueSliderSpeedDeleting"); } else { speedDeletingSlider.value = 1; PlayerPrefs.SetInt("ValueSliderSpeedDeleting", (int)speedDeletingSlider.value); } if (k == 1) { VACA.chromaticAberration = 10.40f; Fisheye_enabled.isOn = true; } else { VACA.chromaticAberration = 0f; Fisheye_enabled.isOn = false; } if (i == 1) { Bloom_enabled.isOn = true; } else { Bloom_enabled.isOn = false; } if (PlayerPrefs.HasKey("InstantPrinting")) { if (PlayerPrefs.GetInt("InstantPrinting") == 0) { Instant_Enabled.isOn = false; } else if (PlayerPrefs.GetInt("InstantPrinting") == 1) { Instant_Enabled.isOn = true; } } else if (!PlayerPrefs.HasKey("InstantPrinting")) { Instant_Enabled.isOn = false; } gallery.Button_Close(); PlayerPrefs.Save(); }