-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
5.2.5可以,5.2.10版本不能使用。你的工程运行结果如下:
load json default.res.json
Main.ts:78 load json config/1.json
Main.ts:78 load json config/2.json
Main.ts:78 load json config/3.json
Main.ts:78 load json config/4.json
-
问题1:
RES.config.config.resourceRoot; RES.config已经没有 -
问题2:
5.2.10加了这句data["root"] = ''; ,我自己把去掉了。
Resource.prototype.addResourceData = function (data) {
//fixed by l2xin 不明白为什么
//data["root"] = '';
RES.config.addResourceData(data);
};
- 问题3:
下面这样写3个文件是ok的,多加一个就失败
if (!RES.hasRes(name)) {
const url = "total.json";
const type = 'json';
const root = "resource/"; //ResourceManager.Instance.ResourceRoot;
const resource = { name, url, type, root };
RES.$addResourceData(resource);
await RES.getResAsync(name);
this.totalContent = RES.getRes(name);
}
else {
if (this.totalContent == null) {
await RES.getResAsync(name);
this.totalContent = RES.getRes(name);
}
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels