public void OpenPopup(string title, string message, System.Action okCallback, System.Action cancelCallback = null, string okLbl = "", string cancelLbl = "") { if (Popup != null) { return; } UIBasePanel panel = Open("PopupPanel"); if (panel != null) { PopupPanel popup = panel.GetComponent <PopupPanel>(); if (popup != null) { Popup = popup; popup.OpenPopup(title, message, okCallback, cancelCallback, okLbl, cancelLbl); } } }