public static void LoadQuest(int id) { if (quests == null) { JSONserializer json = new JSONserializer(); quests = json.loadQuests(); } string location = Application.persistentDataPath + "/Data/GameData.txt"; string s = File.ReadAllText(location); GameData data = JsonUtility.FromJson <GameData>(s); nextQuestID = data.questID; //foreach (Quest quest in quests) //{ // Debug.Log(quest.questID); //} Debug.Log(nextQuestID); }
public static void RefreshQuestList() { JSONserializer json = new JSONserializer(); quests = json.loadQuests(); }