public void ShowModal(ModalType modalType) { Modal modal; modal = currentWindow.GetModal(modalType); // if first time showing modal if (modal == null) { Modal modalPrefab = modalPrefabs.Find(x => x.modalType == modalType); if (modalPrefab != null) { modal = GameObject.Instantiate(modalPrefab); modal.transform.SetParent(currentWindow.transform, false); // modal.transform.SetAsLastSibling(); } else { Debug.LogError("Could not find modal with " + modalType + " type in Resources/" + UiManagerSetting.modalPath + " path."); return; } } currentWindow.AddModal(modal); modal.Show(); }
public void RemoveModal(Modal <TMod> modal) { modalList.Remove(modal); }
public void AddModal(Modal <TMod> modal) { modalList.Add(modal); }
internal void RemoveModal(Modal modal) { modalList.Remove(modal); }