< Summary

Class:DCL.SettingsCommon.SettingsControllers.SpecificControllers.BloomControlController
Assembly:SettingsControllers
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/Settings/SettingsControllers/SpecificControllers/BloomControlController.cs
Covered lines:6
Uncovered lines:0
Coverable lines:6
Total lines:25
Line coverage:100% (6 of 6)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
GetStoredValue()0%110100%
UpdateSetting(...)0%330100%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/Settings/SettingsControllers/SpecificControllers/BloomControlController.cs

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