protected override void RemovePopup(PopupObject po) { ItemPopupObject ipo = (ItemPopupObject)po; ipo.ActivateElements(false); base.RemovePopup(po); }
private ItemPopupObject CreatePopup() { RectTransform popup = Instantiate(popupPrefab, transform, false); Image UIImage = popup.GetComponent <Image>(); Material materialCopy = Instantiate(UIImage.material); UIImage.material = materialCopy; ItemPopupObject po = new ItemPopupObject(popup, materialCopy, popup.GetChild(0).GetComponent <Image>(), popup.GetChild(1).GetChild(0).GetComponent <Text>(), popup.GetChild(1).GetChild(1).GetComponent <Text>()); popup.anchoredPosition += Vector2.down * po.Height; inactivePopups.Add(po); po.ActivateElements(false); return(po); }