/// <summary> /// Current showing view /// </summary> /// <param name="type"></param> /// <param name="AttachedView"></param> public GameObject OpenPopUI(E_PopupType type, E_UIType attachedView = E_UIType.PopupUI, bool isSingleton = false) { int popIndex = GetPopupIndex(type); if (isSingleton && popIndex != -1) { return(popCp.popups[popIndex].uis[0]); } Transform _parent = UISystem.Instance.GetCanvas(attachedView).transform; UISystem.Instance.PopToFront(E_UIType.PopupUI); var _pop = UISystemUtil.CreateUIFromPrefab(poolSystem, (int)type, popCp.POP_PATH + type.ToString(), _parent); _pop.transform.SetSiblingIndex(0); // Update container if (popIndex == -1) { popCp.popups.Add(new PopupDatas(type, new GameObject[] { _pop })); } else { popCp.popups[popIndex].uis.Add(_pop); } popuiShowSystem.ShowView(_pop); return(_pop); }