public string GetJson() { SerializeableQuestLog myClone = new SerializeableQuestLog(); myClone.quests = quests.ToArray(); return(UnityEngine.JsonUtility.ToJson(myClone)); }
public static QuestLog FromJson(string json) { SerializeableQuestLog myClone = UnityEngine.JsonUtility.FromJson <SerializeableQuestLog>(json); QuestLog questlog = new QuestLog { }; questlog.Initialize(myClone.quests.Length); for (int i = 0; i < myClone.quests.Length; i++) { questlog.quests[i] = myClone.quests[i]; } return(questlog); }