Guest User

Untitled

a guest
May 25th, 2018
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. using ADV;
  2. using ParadoxNotion.Serialization.FullSerializer;
  3. using System.Collections.Generic;
  4. using System.IO;
  5. using UnityEngine;
  6.  
  7. public class AssPlug : MonoBehaviour
  8. {
  9. void Start()
  10. {
  11. var res = new Dictionary<string,ScenarioData>();
  12. dump("adv/scenario/op", res);
  13. for (int i = -10; i <= 0; i++)
  14. dump($"adv/scenario/c{i}/00.unity3d", res);
  15. for (int i = 0; i <= 30; i++)
  16. dump($"adv/scenario/c{i:00}/00.unity3d", res);
  17. fsData data = null;
  18. Patchwork.Program.json.TrySerialize(res, out data).AssertSuccess();
  19. File.WriteAllText("dump.json", fsJsonPrinter.PrettyJson(data));
  20. }
  21.  
  22. void dump(string path, Dictionary<string,ScenarioData> res) {
  23. int idx = 0;
  24. while (true) {
  25. var sidx = $"{idx++}";
  26. var sd = CommonLib.LoadAsset<ScenarioData>(path, sidx);
  27. if (sd == null) break;
  28. res[path + "/" + sidx] = sd;
  29. }
  30. }
  31. }
Add Comment
Please, Sign In to add comment