< Summary

Class:DCL.SettingsCommon.SettingsControllers.SpecificControllers.DrawDistanceControlController
Assembly:SettingsControllers
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/Settings/SettingsControllers/SpecificControllers/DrawDistanceControlController.cs
Covered lines:9
Uncovered lines:0
Coverable lines:9
Total lines:25
Line coverage:100% (9 of 9)
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/DrawDistanceControlController.cs

#LineLine coverage
 1using DCL.SettingsCommon.SettingsControllers.BaseControllers;
 2using UnityEngine;
 3
 4namespace DCL.SettingsCommon.SettingsControllers.SpecificControllers
 5{
 6    [CreateAssetMenu(menuName = "Settings/Controllers/Controls/Draw Distance", fileName = "DrawDistanceControlController
 7    public class DrawDistanceControlController : SliderSettingsControlController
 8    {
 29        public override object GetStoredValue() { return currentQualitySetting.cameraDrawDistance; }
 10
 11        public override void UpdateSetting(object newValue)
 12        {
 213            currentQualitySetting.cameraDrawDistance = (float)newValue;
 14
 215            if (SceneReferences.i.thirdPersonCamera)
 216                SceneReferences.i.thirdPersonCamera.m_Lens.FarClipPlane = currentQualitySetting.cameraDrawDistance;
 17
 218            if (SceneReferences.i.firstPersonCamera)
 219                SceneReferences.i.firstPersonCamera.m_Lens.FarClipPlane = currentQualitySetting.cameraDrawDistance;
 20
 221            RenderSettings.fogEndDistance = currentQualitySetting.cameraDrawDistance;
 222            RenderSettings.fogStartDistance = currentQualitySetting.cameraDrawDistance * 0.8f;
 223        }
 24    }
 25}