コード例 #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"
 });