private void SaveEmptyTree()
 {
     LoadJsonFiles.SaveSerializableToJson(
         new QuestSet()
     {
         quests = new QuestInfo[1] {
             new QuestInfo()
             {
                 description = "tet", title = "tett",
                 reward      = new QuestReward()
                 {
                     money = 100, mode = 0
                 },
                 waves = new [] {
                     new WaveItem()
                     {
                         itemId = WaveSpawnItems.FIGHTER, times = 5
                     }
                 }
             }
         }
     }, QUESTS_LOAD_PATH, true);
     LoadJsonFiles.SaveSerializableToJson(
         new QuestTreeDirections()
     {
         nodes = new IntSerializableArr[1] {
             new IntSerializableArr()
             {
                 directions = new int[1] {
                     0
                 }
             }
         }
     }, QUESTTREE_LOAD_PATH, true);
 }
 public static void SaveEmptyTree(OneWayTreeNode node, int pathId)
 {
     LoadJsonFiles.SaveSerializableToJson(
         ExtractQuestSet(node)
         , QUESTS_LOAD_PATH + pathId, false);
     LoadJsonFiles.SaveSerializableToJson(
         ExtractQuestDirections(node)
         , QUESTTREE_LOAD_PATH + pathId, false);
 }
    private void SavePrefabs()
    {
        // assume prefabs are fighters - save their data as a template
        FighterData[] t = new FighterData[lib.prefabs.Length];
        for (int i = 0; i < lib.prefabs.Length; i++)
        {
            Fighter f = lib.prefabs[i].GetComponent <Fighter>();
            if (f)
            {
                t[i] = f.data;
            }
            else
            {
                Debug.Log("[Prefab JSON save] no fighter script " + f.name);
            }
        }
        JSONFighterData data = new JSONFighterData(t);

        LoadJsonFiles.SaveSerializableToJson(data, LoadJsonFiles.JSONPATH + "prefabData.json", false);
    }