Пример #1
0
        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);
        }
Пример #2
0
        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);
        }
Пример #3
0
 public Task <InternalResponse> Get(RequestInternal req) => Task.FromResult(new InternalResponse()
 {
     Info = "yay"
 });