public void Setup(QuestStatus status) { title.text = status.GetQuest().GetTitle(); foreach (var objective in status.GetQuest().GetObjectives()) { GameObject prefabVariant = objectivePrefabUncheck; if (status.IsObjectiveCompleted(objective.reference)) { prefabVariant = objectivePrefab; } GameObject obj = Instantiate(prefabVariant, objectivesContainer); obj.GetComponentInChildren <TextMeshProUGUI>().text = objective.description; } }