[]Laya.loader.create 加载进度问题

我用Laya.loader.create加载.lh模型,
function ModelManager() {
Laya.loader.create("res/Pipe/Pipe/a.lh", Laya.Handler.create(this, this.onCreateComplete()),Laya.Handler.create(this, this.onAssetsLoading));

}

ModelManager.prototype.onCreateComplete = function () {
console.log("onCreateComplete");
var pipe = Laya.loader.getRes("res/Pipe/Pipe/a.lh");
console.log("pipe", pipe);
}
ModelManager.prototype.onAssetsLoading = function (progress) {
console.log("progress = ",progress);
}

打印出来的信息是

onCreateComplete
pipe undefined
progress = 1
progress = 0.3333333333333333
progress = 1

为什么加载完成后又重新计算进度,而且在加载完成的回调方法里还获取不到加载了的资源
已邀请:

赞同来自:

咋删除?这个问题是因为Laya.Handler.create(this, this.onCreateComplete()),Laya.Handler.create(this, this.onAssetsLoading));
this.onCreateComplete() 应该改为 this.onCreateComplete
见笑了。。

1573629845用户

赞同来自:

我也遇到了同样得问题,后来是怎么解决得?

要回复问题请先

商务合作
商务合作