< Summary

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

Metrics

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

File(s)

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

#LineLine coverage
 1using DCL.SettingsCommon.SettingsControllers.BaseControllers;
 2using UnityEngine;
 3using UnityEngine.Rendering;
 4using UnityEngine.Rendering.Universal;
 5
 6namespace DCL.SettingsCommon.SettingsControllers.SpecificControllers
 7{
 8    [CreateAssetMenu(menuName = "Settings/Controllers/Controls/Shadow Distance", fileName = "ShadowDistanceControlContro
 9    public class ShadowDistanceControlController : SliderSettingsControlController
 10    {
 11        private UniversalRenderPipelineAsset lightweightRenderPipelineAsset = null;
 12
 13        public override void Initialize()
 14        {
 215            base.Initialize();
 16
 217            lightweightRenderPipelineAsset = GraphicsSettings.renderPipelineAsset as UniversalRenderPipelineAsset;
 218        }
 19
 220        public override object GetStoredValue() { return currentQualitySetting.shadowDistance; }
 21
 22        public override void UpdateSetting(object newValue)
 23        {
 224            currentQualitySetting.shadowDistance = (float)newValue;
 25
 226            if (lightweightRenderPipelineAsset)
 227                lightweightRenderPipelineAsset.shadowDistance = currentQualitySetting.shadowDistance;
 228        }
 29    }
 30}