< 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:8
Uncovered lines:0
Coverable lines:8
Total lines:24
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;
 2using DCL.SettingsCommon.SettingsControllers.BaseControllers;
 3using UnityEngine;
 4
 5namespace DCL.SettingsCommon.SettingsControllers.SpecificControllers
 6{
 7    [CreateAssetMenu(menuName = "Settings/Controllers/Controls/Detail Object Culling", fileName = "DetailObjectCullingCo
 8    public class DetailObjectCullingControlController : ToggleSettingsControlController
 9    {
 210        public override object GetStoredValue() { return currentQualitySetting.enableDetailObjectCulling; }
 11
 12        public override void UpdateSetting(object newValue)
 13        {
 214            bool newBoolValue = (bool)newValue;
 215            currentQualitySetting.enableDetailObjectCulling = newBoolValue;
 16
 217            Environment.i.platform.cullingController.SetObjectCulling(newBoolValue);
 218            Environment.i.platform.cullingController.SetShadowCulling(newBoolValue);
 219            Environment.i.platform.cullingController.MarkDirty();
 20
 221            CommonSettingsScriptableObjects.detailObjectCullingDisabled.Set(!newBoolValue);
 222        }
 23    }
 24}