//EDIT public void InstantiateSubquestPlate() { SubquestPlate newPlate = Instantiate(subquestPlatePrefab, transform.position, Quaternion.identity, subquestsParent); newPlate.SwitchEditMode(true); subquestAddButton.transform.SetAsLastSibling(); plateList.Add(newPlate); UpdatePlatesIndex(); }
void InstantiateCurrentSubquestPlates(Quest _quest) { plateList = new List <SubquestPlate>(); foreach (SubQuest subQuest in _quest.subQuestList) { SubquestPlate newPlate = Instantiate(subquestPlatePrefab, transform.position, Quaternion.identity, subquestsParent); newPlate.UpdatePlate(subQuest.title, subQuest.second); plateList.Add(newPlate); } UpdatePlatesIndex(); subquestAddButton.transform.SetAsLastSibling(); }