/// <summary> /// Shows the the popup if it's possible with given data /// </summary> /// <param name="popupData">Data that will be used to display popup</param> public void Show(PopupData popupData) { if (!CanBeShown) { popupData.InvokeCancelCallback(); return; } currentData = popupData; uiText.text = currentData.Text; Show(); }
/// <summary> /// Cancels the operation and closes the popup /// </summary> public void Cancel() { Hide(); currentData.InvokeCancelCallback(); currentData = null; }