| | 1 | | using System; |
| | 2 | | using DCL; |
| | 3 | | using UnityEngine; |
| | 4 | |
|
| | 5 | | public class LoadingBridge : MonoBehaviour |
| | 6 | | { |
| | 7 | | [Serializable] |
| | 8 | | public class Payload |
| | 9 | | { |
| | 10 | | public bool isVisible = false; |
| 0 | 11 | | public string message = ""; |
| | 12 | | public bool showTips = false; |
| | 13 | | } |
| | 14 | |
|
| | 15 | | public void SetLoadingScreen(string jsonMessage) |
| | 16 | | { |
| 0 | 17 | | Payload payload = JsonUtility.FromJson<Payload>(jsonMessage); |
| 0 | 18 | | DataStore.i.HUDs.loadingHUD.visible.Set(payload.isVisible); |
| | 19 | |
|
| 0 | 20 | | if (!string.IsNullOrEmpty(payload.message)) |
| 0 | 21 | | DataStore.i.HUDs.loadingHUD.message.Set(payload.message); |
| 0 | 22 | | DataStore.i.HUDs.loadingHUD.showTips.Set(payload.showTips); |
| 0 | 23 | | } |
| | 24 | | } |