< 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:8
Uncovered lines:0
Coverable lines:8
Total lines:25
Line coverage:100% (8 of 8)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
Initialize()0%220100%
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                            Resources.Load<BooleanVariable>("ScriptableObjects/AvatarLODsDisabled").Set(!config.features
 116                        });
 17
 118            UpdateSetting(currentGeneralSettings.maxNonLODAvatars);
 119        }
 20
 121        public override object GetStoredValue() { return currentGeneralSettings.maxNonLODAvatars; }
 22
 423        public override void UpdateSetting(object newValue) { DataStore.i.avatarsLOD.maxAvatars.Set((int)((float)newValu
 24    }
 25}