using System.Collections.Generic; namespace ET.Client { public class CommonUtil : Singleton { public async ETTask OpenCommonServerMsgPanel(string content) { if (string.IsNullOrEmpty(content)) { Log.Error("content == null"); return; } var ui = UIHelper.Get(GameUtil.Instance.GetSceneComponent(), UIType.UICommonServerMsg); if (ui != null && ui.GameObject.activeInHierarchy) { var com = ui.GetComponent(); com.PushTask(content); } else { Dictionary dic = new Dictionary() { { "content",content}, }; await UIHelper.Create(GameUtil.Instance.GetSceneComponent(), UIType.UICommonServerMsg, UILayer.High, dic); } } } }