public void SetBrightnessTest() { BrightnessController brightnessController = new BrightnessController(); Assert.Throws <Exception>(() => { brightnessController.SetBrightness(0.6f); }); //try //{ // brightnessController.SetBrightness(0.6f); // Assert. //} //catch //{ // Assert.True(true); //} }
public void OnBrightnessValueChanged(float newValue) { BrightnessController.SetBrightness(newValue); PlayerPrefs.SetFloat("Brightness", newValue); PlayerPrefs.Save(); }