| | 1 | | using DCL; |
| | 2 | | using DCL.SettingsCommon.SettingsControllers.BaseControllers; |
| | 3 | | using UnityEngine; |
| | 4 | |
|
| | 5 | | namespace DCL.SettingsCommon.SettingsControllers.SpecificControllers |
| | 6 | | { |
| | 7 | | [CreateAssetMenu(menuName = "Settings/Controllers/Controls/Detail Object Culling", fileName = "DetailObjectCullingCo |
| | 8 | | public class DetailObjectCullingControlController : ToggleSettingsControlController |
| | 9 | | { |
| 2 | 10 | | public override object GetStoredValue() { return currentQualitySetting.enableDetailObjectCulling; } |
| | 11 | |
|
| | 12 | | public override void UpdateSetting(object newValue) |
| | 13 | | { |
| 2 | 14 | | bool newBoolValue = (bool)newValue; |
| 2 | 15 | | currentQualitySetting.enableDetailObjectCulling = newBoolValue; |
| | 16 | |
|
| 2 | 17 | | Environment.i.platform.cullingController.SetObjectCulling(newBoolValue); |
| 2 | 18 | | Environment.i.platform.cullingController.SetShadowCulling(newBoolValue); |
| 2 | 19 | | Environment.i.platform.cullingController.MarkDirty(); |
| | 20 | |
|
| 2 | 21 | | CommonSettingsScriptableObjects.detailObjectCullingDisabled.Set(!newBoolValue); |
| 2 | 22 | | } |
| | 23 | | } |
| | 24 | | } |