public void ShowToast(string msg, float time) { if (string.IsNullOrEmpty(msg)) { return; } ToastPanel toast = GetPanel(UIPanelType.toast) as ToastPanel; toast.SetDuringTime(time); if (!toast.IsEnter()) { toast.SetMessage(msg); toast.OnEnter(); } }