public void ChangeCloudStyle() { if (cloudStyleDropdown.value == 1) { style = CloudStyle.Fast; } if (cloudStyleDropdown.value == 2) { style = CloudStyle.Fancy; } PlayerPrefs.SetInt("CloudStyle", cloudStyleDropdown.value); }
void Start() { try { renderDistanceSlider.value = PlayerPrefs.GetInt("ViewDistance"); if (PlayerPrefs.GetInt("Clouds") == 0) { enableClouds.isOn = false; } if (PlayerPrefs.GetInt("Clouds") == 1) { enableClouds.isOn = true; } if (PlayerPrefs.GetInt("CloudStyle") == 1) { style = CloudStyle.Fast; cloudStyleDropdown.value = 1; } if (PlayerPrefs.GetInt("CloudStyle") == 2) { style = CloudStyle.Fancy; cloudStyleDropdown.value = 2; } if (PlayerPrefs.GetInt("LightStyle") == 1) { lightStyle = LightStyle.Fast; lightStyleDropdown.value = 1; } if (PlayerPrefs.GetInt("LightStyle") == 2) { lightStyle = LightStyle.Fancy; lightStyleDropdown.value = 2; } } catch { renderDistanceSlider.value = VoxelData.ViewDistanceInChunks; } if (Application.platform == RuntimePlatform.WebGLPlayer) { enableThreading.isOn = false; } }