public void AcceptQuest() { questWindow.SetActive(false); quest[contActiveQuest].isActive = true; //give to the player the quest assign the quest //player.quest = quest; (create a list of quest) player.activeQuest.Add(quest[contActiveQuest]); activeQuest.AddQuest(quest[contActiveQuest]); if (contActiveQuest < quest.Count) { contActiveQuest++; //To open all the quest //OpenQuestWindow(); } }