< Summary

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

Metrics

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

File(s)

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

#LineLine coverage
 1using DCL.SettingsCommon;
 2using UnityEngine;
 3
 4namespace DCL.SettingsControls
 5{
 6    [CreateAssetMenu(menuName = "Settings/Controllers/Controls/Detail Object Culling", fileName = "DetailObjectCullingCo
 7    public class DetailObjectCullingControlController : ToggleSettingsControlController
 8    {
 29        public override object GetStoredValue() { return currentQualitySetting.enableDetailObjectCulling; }
 10
 11        public override void UpdateSetting(object newValue)
 12        {
 213            bool newBoolValue = (bool)newValue;
 214            currentQualitySetting.enableDetailObjectCulling = newBoolValue;
 15
 216            Environment.i.platform.cullingController.SetObjectCulling(newBoolValue);
 217            Environment.i.platform.cullingController.SetShadowCulling(newBoolValue);
 218            Environment.i.platform.cullingController.MarkDirty();
 19
 220            CommonSettingsScriptableObjects.detailObjectCullingDisabled.Set(!newBoolValue);
 221        }
 22    }
 23}