< Summary

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

Metrics

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

File(s)

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

#LineLine coverage
 1using DCL.Interface;
 2using DCL.SettingsCommon.SettingsControllers.BaseControllers;
 3using UnityEngine;
 4
 5namespace DCL.SettingsCommon.SettingsControllers.SpecificControllers
 6{
 7    [CreateAssetMenu(menuName = "Settings/Controllers/Controls/Dynamic Skybox", fileName = "DynamicSkyboxControlControll
 8    public class DynamicSkyboxControlController : ToggleSettingsControlController
 9    {
 10        // Start is called before the first frame update
 111        public override object GetStoredValue() { return currentGeneralSettings.dynamicProceduralSkybox; }
 12
 13        // Update is called once per frame
 14        public override void UpdateSetting(object newValue)
 15        {
 116            currentGeneralSettings.dynamicProceduralSkybox = (bool)newValue;
 117            if (currentGeneralSettings.dynamicProceduralSkybox)
 18            {
 119                DataStore.i.skyboxConfig.useDynamicSkybox.Set(true);
 120            }
 21            else
 22            {
 023                DataStore.i.skyboxConfig.useDynamicSkybox.Set(false);
 24            }
 25
 126            CommonSettingsScriptableObjects.dynamicSkyboxDisabled.Set(currentGeneralSettings.dynamicProceduralSkybox);
 127        }
 28    }
 29}