public override bool ProcessRequest(Request req) { RequestInternal ireq = (RequestInternal)req; string path = GetUnityPath(req.path, false); if (!mAssetBundle.Contains(path)) { ireq.Error(ErrorCode.FileNotExist); return(false); } AssetBundleRequest resReq = mAssetBundle.LoadAssetAsync(path, req.type); ireq.processor = new RequestProcessBundle(resReq); return(true); }
public override bool ProcessRequest(Request req) { RequestInternal ireq = (RequestInternal)req; string path = GetUnityPath(req.path, true); ResourceRequest resReq = Resources.LoadAsync(path, req.type); if (resReq.isDone && resReq.asset == null) { ireq.Error(ErrorCode.FileNotExist); return(false); } ireq.processor = new RequestProcessResource(resReq); return(true); }
public Task <InternalResponse> Get(RequestInternal req) => Task.FromResult(new InternalResponse() { Info = "yay" });