| | 1 | | using DCL.Models; |
| | 2 | | using System.Collections.Generic; |
| | 3 | | using UnityEngine; |
| | 4 | |
|
| | 5 | | namespace DCL.Controllers.LoadingScreenV2 |
| | 6 | | { |
| | 7 | | /// <summary> |
| | 8 | | /// The HintSceneParserUtil class is a utility class designed to handle the deserialization and conversion of JS |
| | 9 | | /// If the parsing process encounters null values or an absence of loading screen hints, it will return an empty |
| | 10 | | /// </summary> |
| | 11 | | public class HintSceneParserUtil |
| | 12 | | { |
| | 13 | | public static List<Hint> ParseJsonToHints(string json) |
| | 14 | | { |
| 0 | 15 | | var hints = new List<Hint>(); |
| 0 | 16 | | LoadParcelScenesMessage.UnityParcelScene sceneJson = JsonUtility.FromJson<LoadParcelScenesMessage.UnityParce |
| | 17 | |
|
| 0 | 18 | | if (sceneJson == null || sceneJson.loadingScreenHints == null) |
| 0 | 19 | | return hints; |
| | 20 | |
|
| 0 | 21 | | foreach (Hint hint in sceneJson.loadingScreenHints) { hints.Add(new Hint(hint.TextureUrl, hint.Title, hint.B |
| | 22 | |
|
| 0 | 23 | | return hints; |
| | 24 | | } |
| | 25 | | } |
| | 26 | | } |