< Summary

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

Metrics

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

File(s)

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

#LineLine coverage
 1using DCL;
 2using DCL.Rendering;
 3using DCL.SettingsCommon.SettingsControllers.BaseControllers;
 4using UnityEngine;
 5
 6namespace DCL.SettingsCommon.SettingsControllers.SpecificControllers
 7{
 8    [CreateAssetMenu(menuName = "Settings/Controllers/Controls/Detail Object Culling", fileName = "DetailObjectCullingCo
 9    public class DetailObjectCullingControlController : ToggleSettingsControlController
 10    {
 211        public override object GetStoredValue() { return currentQualitySetting.enableDetailObjectCulling; }
 12
 13        public override void UpdateSetting(object newValue)
 14        {
 215            bool newBoolValue = (bool)newValue;
 216            currentQualitySetting.enableDetailObjectCulling = newBoolValue;
 17
 218            ICullingController cullingController = Environment.i.platform.cullingController;
 19
 220            if ( cullingController != null )
 21            {
 122                cullingController.SetObjectCulling(newBoolValue);
 123                cullingController.SetShadowCulling(newBoolValue);
 124                cullingController.MarkDirty();
 25            }
 26
 227            CommonSettingsScriptableObjects.detailObjectCullingDisabled.Set(!newBoolValue);
 228        }
 29    }
 30}