[]LayaAir 2.0 TS版编译出错GameConfig跟创建项目时生成的内容不一致了

这是创建项目时的内容
/**This class is automatically generated by LayaAirIDE, please do not make any modifications. */
import GameUI from "./script/GameUI"
import GameControl from "./script/GameControl"
import Bullet from "./script/Bullet"
import DropBox from "./script/DropBox"
/*
* 游戏初始化配置;
*/
export default class GameConfig{
static width:number=640;
static height:number=1136;
static scaleMode:string="fixedwidth";
static screenMode:string="none";
static startScene:string="test/TestScene.scene";
static sceneRoot:string="";
static debug:boolean=false;
static stat:boolean=false;
static physicsDebug:boolean=false;
static exportSceneToJson:boolean=true;
constructor(){}
static init(){
var reg: Function = Laya.ClassUtils.regClass;
reg("script/GameUI.ts",GameUI);
reg("script/GameControl.ts",GameControl);
reg("script/Bullet.ts",Bullet);
reg("script/DropBox.ts",DropBox);
}
}
GameConfig.init();
编译之后变成:
/*
* 游戏初始化配置;
*/
class GameConfig{
static width:number=1136;
static height:number=640;
static scaleMode:string="showall";
static screenMode:string="none";
static alignV:string="top";
static alignH:string="left";
static startScene:any=script/GameUI.ts;
static sceneRoot:string="";
static debug:boolean=false;
static stat:boolean=false;
constructor(){

}
}
并提示错误:
TypeScript error: src/gameconfig.ts(11,27): Error TS2552: Cannot find name 'script'. Did you mean 'WScript'?
已邀请:

Aar0n

赞同来自: 欢乐马07

编辑模式下f9 设置的配置会更改这个文件。

hj

赞同来自:

你提供一下demo吧,这边测试着没有问题啊

要回复问题请先

商务合作
商务合作