| | 1 | | using UnityEngine; |
| | 2 | |
|
| | 3 | | namespace 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 | | { |
| 1 | 10 | | base.Initialize(); |
| | 11 | |
|
| 1 | 12 | | KernelConfig.i.EnsureConfigInitialized() |
| | 13 | | .Then(config => |
| | 14 | | { |
| 1 | 15 | | Resources.Load<BooleanVariable>("ScriptableObjects/AvatarLODsDisabled").Set(!config.features |
| 1 | 16 | | }); |
| | 17 | |
|
| 1 | 18 | | UpdateSetting(currentGeneralSettings.maxNonLODAvatars); |
| 1 | 19 | | } |
| | 20 | |
|
| 1 | 21 | | public override object GetStoredValue() { return currentGeneralSettings.maxNonLODAvatars; } |
| | 22 | |
|
| 4 | 23 | | public override void UpdateSetting(object newValue) { DataStore.i.avatarsLOD.maxAvatars.Set((int)((float)newValu |
| | 24 | | } |
| | 25 | | } |