< Summary

Class:DCL.SettingsControls.MaxNonLODAvatarsControlController
Assembly:SettingsControllers
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/Settings/SettingsControllers/SpecificControllers/MaxNonLODAvatarsControlController.cs
Covered lines:10
Uncovered lines:0
Coverable lines:10
Total lines:27
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%110100%
OnKernelConfigChanged(...)0%110100%
GetStoredValue()0%110100%
UpdateSetting(...)0%110100%

File(s)

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

#LineLine coverage
 1using UnityEngine;
 2
 3namespace DCL.SettingsControls
 4{
 5    [CreateAssetMenu(menuName = "Settings/Controllers/Controls/Max Non-LOD Avatars", fileName = "MaxNonLODAvatarsControl
 6    public class MaxNonLODAvatarsControlController : SliderSettingsControlController
 7    {
 8        public override void Initialize()
 9        {
 110            base.Initialize();
 11
 112            KernelConfig.i.EnsureConfigInitialized()
 13                        .Then(config =>
 14                        {
 115                            KernelConfig.i.OnChange += OnKernelConfigChanged;
 116                            OnKernelConfigChanged(config, null);
 117                        });
 18
 119            UpdateSetting(currentGeneralSettings.maxNonLODAvatars);
 120        }
 21
 1222        private void OnKernelConfigChanged(KernelConfigModel current, KernelConfigModel previous) { Resources.Load<Boole
 123        public override object GetStoredValue() { return currentGeneralSettings.maxNonLODAvatars; }
 24
 425        public override void UpdateSetting(object newValue) { DataStore.i.avatarsLOD.maxAvatars.Set((int)((float)newValu
 26    }
 27}