| | 1 | | using System.Collections; |
| | 2 | | using System.Collections.Generic; |
| | 3 | | using System.IO; |
| | 4 | | using System.Linq; |
| | 5 | | using DCL.Helpers; |
| | 6 | | using UnityEditor; |
| | 7 | | using UnityEngine; |
| | 8 | |
|
| | 9 | | [CreateAssetMenu(fileName = "WearableItemList", menuName = "Variables/Tests/WearableItemList")] |
| | 10 | | public class WearableItemDummyListVariable : ScriptableObject |
| | 11 | | { |
| | 12 | | public List<WearableItemDummy> list; |
| | 13 | |
|
| | 14 | | [ContextMenu("Load test catalog")] |
| | 15 | | private void FillWithTestCatalog() |
| | 16 | | { |
| 0 | 17 | | string file = "TestCatalog.json"; |
| 0 | 18 | | var catalogJson = File.ReadAllText(TestAssetsUtils.GetPathRaw() + $"/Avatar/{file}"); //Utils.GetTestAssetPath r |
| 0 | 19 | | list = Newtonsoft.Json.JsonConvert.DeserializeObject<WearableItemDummy[]>(catalogJson).ToList(); // JsonUtility |
| 0 | 20 | | } |
| | 21 | | } |