public void LoadQuestLog(int index) { Questlog questlog = Questlog.Instance; List <QuestData> questDatas = saveData.GameDatas[index].QuestLogData.QuestDatas; QuestGiver[] questGivers = FindObjectsOfType <QuestGiver>(); foreach (QuestData questData in questDatas) { QuestGiver questGiver = Array.Find(questGivers, x => x.Name == questData.QuestGiverName); foreach (Quest quest in questGiver.Quests) { if (quest.Title == questData.Title) { quest.QuestGiver = questGiver; quest.KillObjectives = questData.KillObjectives; Questlog.Instance.AcceptQuest(quest); } } } }
public void Start() { questlog = GameObject.Find("Questlog").GetComponent<Questlog>(); uiQuestList = null; }