/// <summary> /// 以 webreuest 方式加载网络非ab资源 /// </summary> /// <param name="req"></param> /// <param name="coroutine"></param> /// <returns></returns> static public void UnityWebRequest(CRequest req) { UnityWebRequestOperation op = UnityWebRequestOperation.Get();; op.SetRequest(req); inProgressOperations.Add(op); op.BeginDownload(); }
/// <summary> /// 以 webreuest 方式加载网络非ab资源 /// </summary> /// <param name="url"></param> /// <param name="head"></param> /// <param name="type"></param> /// <returns></returns> static public HttpLoadOperation UnityWebRequestCoroutine(string url, WebHeaderCollection head, System.Type type) { var req = CRequest.Get(); req.head = head; req.assetType = type; req.vUrl = url; var op = new UnityWebRequestOperation(); req.assetOperation = op; op.SetRequest(req); inProgressOperations.Add(op); op.BeginDownload(); return(op); }