< 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:4
Uncovered lines:2
Coverable lines:6
Total lines:26
Line coverage:66.6% (4 of 6)
Covered branches:0
Total branches:0
Covered methods:2
Total methods:2
Method coverage:100% (2 of 2)

Metrics

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

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    {
 10        // TODO:: make it return the correct value when bloom is fixed
 111        public override object GetStoredValue() { return currentQualitySetting.bloom; }
 12
 13        public override void UpdateSetting(object newValue)
 14        {
 115            currentQualitySetting.bloom = (bool)newValue;
 16
 117            if (SceneReferences.i.postProcessVolume)
 18            {
 019                if (SceneReferences.i.postProcessVolume.profile.TryGet<Bloom>(out Bloom bloom))
 20                {
 021                    bloom.active = currentQualitySetting.bloom;
 22                }
 23            }
 124        }
 25    }
 26}