public void ChangeScene(string _nextSceneName) { if (UICanvas.GetUICanvas("FadeCanvas") == null) { var fadeCanvas = UICanvas.CreateUICanvas("FadeCanvas"); DontDestroyOnLoad(fadeCanvas); fadeCanvas.GetComponent <Canvas>().sortingOrder = 20000; } UIPopup fade = UIPopup.GetPopup("Fade"); fade.GetComponent <FadeOverlay>().Show(_nextSceneName); }
private void Start() { SetDateText(m_selectedDate); // set present day m_dateButton.OnClick.OnTrigger.Event.AddListener(() => { UIPopup calendarPopup = UIPopup.GetPopup("CalendarPopup"); calendarPopup.Show(); calendarPopup.Data.Buttons[0].OnClick.OnTrigger.Event.AddListener(() => { m_selectedDate = calendarPopup.GetComponent <CalendarController>().GetSelectedDate(); SetDateText(m_selectedDate); }); }); }
private void ShowPopup(UnlockResult newUnlock) { UIPopup popup = UIPopup.GetPopup(Popups.UNLOCK_POPUP); if (popup == null) { return; } PopupUnlock popupUnlock = popup.GetComponent <PopupUnlock>(); popupUnlock.Setup(newUnlock); popup.Show(); }
public void Show() { popup = UIPopup.GetPopup(prefabPopup.name); if (popup == null) { return; } popup.GetComponent <Popup>().SetImage(imageButton); popup.HideOnBackButton = false; popup.HideOnClickAnywhere = true; popup.HideOnClickOverlay = true; popup.HideOnClickContainer = true; popup.AutoHideAfterShow = false; popup.Show(); }