Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using ADV;
- using ParadoxNotion.Serialization.FullSerializer;
- using System.Collections.Generic;
- using System.IO;
- using UnityEngine;
- public class AssPlug : MonoBehaviour
- {
- void Start()
- {
- var res = new Dictionary<string,ScenarioData>();
- dump("adv/scenario/op", res);
- for (int i = -10; i <= 0; i++)
- dump($"adv/scenario/c{i}/00.unity3d", res);
- for (int i = 0; i <= 30; i++)
- dump($"adv/scenario/c{i:00}/00.unity3d", res);
- fsData data = null;
- Patchwork.Program.json.TrySerialize(res, out data).AssertSuccess();
- File.WriteAllText("dump.json", fsJsonPrinter.PrettyJson(data));
- }
- void dump(string path, Dictionary<string,ScenarioData> res) {
- int idx = 0;
- while (true) {
- var sidx = $"{idx++}";
- var sd = CommonLib.LoadAsset<ScenarioData>(path, sidx);
- if (sd == null) break;
- res[path + "/" + sidx] = sd;
- }
- }
- }
Add Comment
Please, Sign In to add comment