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