| | 1 | | using System; |
| | 2 | | using DCL; |
| | 3 | | using UnityEngine; |
| | 4 | |
|
| | 5 | | public class AbDetectorBridge : MonoBehaviour |
| | 6 | | { |
| | 7 | | [Serializable] |
| | 8 | | class DetectABsPayload |
| | 9 | | { |
| | 10 | | public bool isOn; |
| | 11 | | public bool forCurrentScene; |
| | 12 | | } |
| | 13 | |
|
| | 14 | |
|
| | 15 | | public void DetectABs(string payload) |
| | 16 | | { |
| 0 | 17 | | var data = JsonUtility.FromJson<DetectABsPayload>(payload); |
| 0 | 18 | | if (data.forCurrentScene) |
| | 19 | | { |
| 0 | 20 | | DataStore.i.debugConfig.showSceneABDetectionLayer.Set(data.isOn, notifyEvent:true); |
| 0 | 21 | | } |
| | 22 | | else |
| | 23 | | { |
| 0 | 24 | | DataStore.i.debugConfig.showGlobalABDetectionLayer.Set(data.isOn, notifyEvent:true); |
| | 25 | | } |
| 0 | 26 | | } |
| | 27 | | } |