/// <summary> /// 从远程服务器下载大量文件 /// </summary> /// <param name="assetsUrl"></param> /// <param name="OnDownloadedAssets"></param> /// <param name="DownloadProgress"></param> /// <param name="OnDownloadFinish"></param> /// <param name="forceSave"></param> public void DownloadFilesFromServer(string[] assetsUrl, Action <string, byte[]> OnDownloadedAssets, Action <float> DownloadProgress = null, Action <List <string> > OnDownloadFinish = null, Action <string> OnDownloadAssetErrorCallback = null, bool forceSave = false) { HttpDownloader downloader = new HttpDownloader(); downloader.DownloadMultipleFileFromServer(assetsUrl, OnDownloadedAssets, DownloadProgress, OnDownloadFinish, OnDownloadAssetErrorCallback, forceSave); }
/// <summary> /// 从远程服务器下载文本 /// </summary> /// <param name="textFileFullUrl"></param> /// <param name="OnDownloaded"></param> public void DownloadTextFromServer(string textFileFullUrl, Action <string> OnDownloaded, Action <string> OnDownloadError) { HttpDownloader downloader = new HttpDownloader(); downloader.DownloadTextFromServer(textFileFullUrl, OnDownloaded, OnDownloadError); }
/// <summary> /// 从远程服务器下载文件 /// </summary> /// <param name="bufferFileName"></param> /// <param name="OnDownloaded"></param> public void DownloadBufferFromServer(string bufferFileName, Action <byte[]> OnDownloaded, Action <string> OnDownloadError) { HttpDownloader downloader = new HttpDownloader(); downloader.DownloadBufferFromServer(bufferFileName, OnDownloaded, OnDownloadError); }