1234567891011121314151617181920212223242526272829 |
- using Blue;
- using UnityEngine.Networking;
- public class UnityWebRequestUtility : IUtility
- {
- /// <summary>
- /// 获取下载进度
- /// </summary>
- public float GetProcess(UnityWebRequest webRequestPoint)
- {
- if (webRequestPoint != null)
- {
- return webRequestPoint.downloadProgress;
- }
- return 0;
- }
- /// <summary>
- /// 获取当前下载内容长度
- /// </summary>
- public long GetCurrentLength(UnityWebRequest webRequestPoint)
- {
- if (webRequestPoint != null)
- {
- return (long)webRequestPoint.downloadedBytes;
- }
- return 0;
- }
- }
|