| | 1 | | using DCL.SettingsCommon.SettingsControllers.BaseControllers; |
| | 2 | | using UnityEngine; |
| | 3 | | using UnityEngine.Rendering.Universal; |
| | 4 | |
|
| | 5 | | namespace DCL.SettingsCommon.SettingsControllers.SpecificControllers |
| | 6 | | { |
| | 7 | | [CreateAssetMenu(menuName = "Settings/Controllers/Controls/Bloom", fileName = "BloomControlController")] |
| | 8 | | public class BloomControlController : ToggleSettingsControlController |
| | 9 | | { |
| 2 | 10 | | public override object GetStoredValue() { return currentQualitySetting.bloom; } |
| | 11 | |
|
| | 12 | | public override void UpdateSetting(object newValue) |
| | 13 | | { |
| 2 | 14 | | currentQualitySetting.bloom = (bool)newValue; |
| | 15 | |
|
| 2 | 16 | | if (SceneReferences.i.postProcessVolume) |
| | 17 | | { |
| 1 | 18 | | if (SceneReferences.i.postProcessVolume.profile.TryGet<Bloom>(out Bloom bloom)) |
| | 19 | | { |
| 1 | 20 | | bloom.active = currentQualitySetting.bloom; |
| | 21 | | } |
| | 22 | | } |
| 2 | 23 | | } |
| | 24 | | } |
| | 25 | | } |