public void FindChildPopups() { if (popupRoot == null) { Debug.LogError("[Banana] PopupRoot is Null!!"); return; } for (var i = 0; i < popupRoot.childCount; ++i) { var child = popupRoot.GetChild(i).GetComponent <PopupBase>(); if (child != null) { PopupDic.Add(child.name, child); } } }
private void FindChildPopups() { foreach (var popupRoot in _popupRoots) { for (var i = 0; i < popupRoot.childCount; ++i) { var child = popupRoot.GetChild(i).GetComponent <PopupBase>(); if (child != null) { PopupDic.Add(child.name, child); child.gameObject.SetActive(true); child.PreInit(popupRoot, _settings.dimmingTime); } } popupRoot.GetComponent <CanvasScaler>().matchWidthOrHeight = DeviceUtil.GetScaleMatch(); } }