[LayaAir 2.0]layabox加载fairygui发布的二进制文件报错

用的是layabox2.6.0  在微信小游戏里面可以正常加载,vivo小游戏加载不了,路径没问题,麻烦看下
 
加载代码
Laya.loader.load([
            { url:"res/Bag_atlas0.png", type:Laya.Loader.IMAGE },
            { url:"res/Bag_atlas0_1.png", type:Laya.Loader.IMAGE},
            { url:"res/Bag.json", type:Laya.Loader.BUFFER} 
            ], Laya.Handler.create(this, this.onLoaded));
 
Laya.core.js   调试log
__proto._endLoad=function(resInfo,content){
var url=resInfo.url;
//输出////////////////////////////////
console.log("url:"+url);
content==null?console.log("content null"):console.log("content not null");
//输出////////////////////////////////
if (content==null){
var errorCount=this._failRes[url] || 0;
if (errorCount < this.retryNum){
console.warn("[warn]Retry to load:",url);
this._failRes[url]=errorCount+1;
Laya.systemTimer.once(this.retryDelay,this,this._addReTry,[resInfo],false);
return;
}else {
Loader.clearRes(url);
console.warn("[error]Failed to load:",url);
this.event(/*laya.events.Event.ERROR*/"error",url);
}
}
if (this._failRes[url])this._failRes[url]=0;
delete LoaderManager._resMap[url];
if (resInfo.originalUrl){
content=Loader.getRes(resInfo.originalUrl);
}
resInfo.event(/*laya.events.Event.COMPLETE*/"complete",content);
resInfo.offAll();
this._infoPool.push(resInfo);
this._statInfo.loaded++;
this.event(/*laya.events.Event.PROGRESS*/"progress",this.getProgress());
}
 
调试结果
(no filename):1 //res/Bag.json [21357]:undefined
c.warn @ (no filename):1
(no filename):1 url:res/Bag.json
(no filename):1 content null
(no filename):1 [warn]Retry to load: res/Bag.json
c.warn @ (no filename):1
(no filename):1 //res/Bag.json [116]:undefined
c.warn @ (no filename):1
(no filename):1 url:res/Bag.json
(no filename):1 content null
(no filename):1 [error]Failed to load: res/Bag.json
c.warn @ (no filename):1
(no filename):1 url:res/Bag_atlas0.png
(no filename):1 content not null
(no filename):1 url:res/Bag_atlas0_1.png
(no filename):1 content not null
已邀请:

姚生

赞同来自:

图片加载后content是有值,Bag.json这个文件加载后是空的

姚生

赞同来自:

可以了, laya.core.js   fairygui.js  都更新到最新版本  用laya2.6.0发布终于可以了

要回复问题请先

商务合作
商务合作