Browse Source

添加消息类示例

DGJ 1 year ago
parent
commit
794839407c
1 changed files with 15 additions and 2 deletions
  1. 15 2
      Assets/2.0/Tools/DownLoadItem.cs

+ 15 - 2
Assets/2.0/Tools/DownLoadItem.cs

@@ -66,13 +66,26 @@ public class DownLoadItem : MonoBehaviour
             {
                 downLoadState = "下载成功";
                 downLoadData = webRequest.downloadHandler.data;
-                isDownLoad = true;  
-               // MsgHandler.AddListener("",)
+                isDownLoad = true;
+                MsgHandler.AddListener("", HandleMsg);
             }
             CallBacke(isDownLoad);
         }
     }
 
+    private void HandleMsg(Msg msg)
+    {
+        try
+        {
+           
+        }
+        catch (System.Exception e)
+        {
+
+           // ErrorLogPanel.Instance.Show(" 返回生成素材出现错误 " + e.Message);
+        }
+    }
+
     private void OnDestroy()
     {
         // 断开下载连接