private void MakeAndStoreSection(int i) { TipPopUpSection newSection = CloneDefaultSection(); ConfigureSection(newSection, tipsData[i]); storedSections[i] = newSection; }
private void ConfigureSection(TipPopUpSection newSection, TipSectionData sectionData) { newSection.PopulateSection(sectionData); newSection.transform.SetParent(verticalLayoutGroup, false); SetRectTransformHeight(newSection.GetComponent <RectTransform>(), sectionData.height); newSection.gameObject.SetActive(true); }