< Summary

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

Metrics

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

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/Settings/SettingsControllers/SpecificControllers/RenderingScaleControlController.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/Rendering Scale", fileName = "RenderingScaleControlContro
 9    public class RenderingScaleControlController : SliderSettingsControlController
 10    {
 11        private UniversalRenderPipelineAsset lightweightRenderPipelineAsset = null;
 12
 13        public override void Initialize()
 14        {
 215            base.Initialize();
 16
 217            if (lightweightRenderPipelineAsset == null)
 218                lightweightRenderPipelineAsset = GraphicsSettings.renderPipelineAsset as UniversalRenderPipelineAsset;
 219        }
 20
 221        public override object GetStoredValue() { return currentQualitySetting.renderScale; }
 22
 23        public override void UpdateSetting(object newValue)
 24        {
 225            currentQualitySetting.renderScale = (float)newValue;
 26
 227            if (lightweightRenderPipelineAsset != null)
 28            {
 229                lightweightRenderPipelineAsset.renderScale = currentQualitySetting.renderScale;
 30            }
 31
 232            RaiseOnIndicatorLabelChange(currentQualitySetting.renderScale.ToString("0.0"));
 233        }
 34    }
 35}