/// <summary> /// 获取下载数据的抽象过程 /// </summary> /// <param name="_operation"></param> /// <returns></returns> protected string GetContent(UAsyncOperation _operation) { UDownloadRequest request = _operation as UDownloadRequest; byte[] binary; if (UnpackKeystore != null) { binary = UnpackKeystore(request.Bytes); } else { binary = request.Bytes; } if (binary != null) { return(Encoding.Default.GetString(binary)); } else { return(""); } }
public AppPublishContentLoader(string _url) { UnpackKeystore = null; this.StartCoroutine(LoadAsset(UDownloadRequest.Send(_url))); }
public AppPublishContentLoader(string _url, Func <byte[], byte[]> _unpackKeystore) { UnpackKeystore = _unpackKeystore; this.StartCoroutine(LoadAsset(UDownloadRequest.Send(_url))); }