[]载入场景报错
从unity导出场景,只有maincamera 和light,所有代码如下
Uncaught Error: LoaderManager:unknown file(G:/LayaTest/bin/TestScene/TestScene.ls) extension with: ls.
at LoaderManager.__proto._create (laya.core.js:12387)
at LoaderManager.__proto.create (laya.core.js:12375)
at new GameMain (LayaSample.ts:14)
at LayaSample.ts:25
能麻烦看看是什么原因吗
import Handler=laya.utils.Handler;工程文件在附件,运行后报错
import Loader=laya.net.Loader;
// 程序入口
class GameMain {
constructor() {
Laya.init(600, 400);
Laya.stage.scaleMode = Laya.Stage.SCALE_EXACTFIT;
Laya.stage.screenMode = Laya.Stage.SCREEN_VERTICAL;
Laya.stage.alignH = Laya.Stage.ALIGN_CENTER;
Laya.stage.alignV = Laya.Stage.ALIGN_MIDDLE;
console.log("load");
Laya.loader.create("TestScene/TestScene.ls", Laya.Handler.create(this, this.LoadSceneComplete));
}
LoadSceneComplete() {
console.log("finish")
let scene: Laya.Scene = Laya.loader.getRes("TestScene/TestScene.ls") as Laya.Scene;
// scene.enableLight = true;
Laya.stage.addChild(scene);
}
}
new GameMain();
Uncaught Error: LoaderManager:unknown file(G:/LayaTest/bin/TestScene/TestScene.ls) extension with: ls.
at LoaderManager.__proto._create (laya.core.js:12387)
at LoaderManager.__proto.create (laya.core.js:12375)
at new GameMain (LayaSample.ts:14)
at LayaSample.ts:25
能麻烦看看是什么原因吗
没有找到相关结果
已邀请:
要回复问题请先登录
1 个回复
Aar0n
赞同来自: