private static IEnumerator DowndLoadFile(string downLoadUrl, string storageLocaPath, Action <float> progress) { WWW downloadOperation = new WWW(downLoadUrl); CoroutineMgr.StartCoroutinee(DowndLoadFileProg(downloadOperation, progress)); yield return(downloadOperation); if (downloadOperation.isDone && string.IsNullOrEmpty(downloadOperation.error)) { //生成文件 Byte[] b = downloadOperation.bytes; Log.Debug("下载完成:" + storageLocaPath); File.WriteAllBytes(storageLocaPath, b); progress.Invoke(1); } else { progress.Invoke(-1); } }
public static void DowndLoadProgress(string downLoadUrl, string storageLocaPath, Action <float> progress) { CoroutineMgr.StartCoroutinee(DowndLoadFile(downLoadUrl, storageLocaPath, progress)); }
//微信分享截屏 public void WeChatShareScreen() { CoroutineMgr.StartCoroutinee(CaptureScreen(ScreenFinsh)); }