예제 #1
0
        /// <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("");
            }
        }
예제 #2
0
 public AppPublishContentLoader(string _url)
 {
     UnpackKeystore = null;
     this.StartCoroutine(LoadAsset(UDownloadRequest.Send(_url)));
 }
예제 #3
0
 public AppPublishContentLoader(string _url, Func <byte[], byte[]> _unpackKeystore)
 {
     UnpackKeystore = _unpackKeystore;
     this.StartCoroutine(LoadAsset(UDownloadRequest.Send(_url)));
 }