• 首页
  • 动态
  • 案例
  • 引擎社区
  • API
  • 文档
  • 示例
  • 引擎下载

大约有 122 项符合查询结果, 库内数据总量为 30,935 项。 (搜索耗时: 0.0031 秒)

11. 微信小游戏报错 the .lh file root type must be Scene [ 90%]

微信小游戏报错 the .lh file root type must be Scene 引擎版本1.7.17beta private screen3DPath: string = "res/layaScene/xiangsuqiche.ls"; public LoadScene3D(): Laya.Scene { console.log("screen#DPath = " + this.screen3DPath); let scene: Laya.Scene = Laya.Scene.load(this.screen3DPath); Laya.s...

来源: Laya_社区 发布时间: 20180323

12. worldroot [ 90%]

worldroot let root = new Laya.Sprite(); Laya.stage.addChildAt(root, 0);   Laya.Physics.I.worldRoot = root;   Laya.stage.on(Laya.Event.CLICK, this, () => { Laya.Physics.I.worldRoot.x -= 50; });   设置worldRoot = 一个新的sprite后, 移动world root ,物理世界不会跟着一起移...

来源: Laya_社区 发布时间: 20181126

13. 如何在laya中直接使用proto中定义的enum? [ 88%]

...5519 赞同来自: 我用的是ts项目,麻烦详细指教:我获取到root_protocol后如何使用? let root_protocol:any = null; function protobufInit(){     var ProtoBuf:any = Browser.window.protobuf;     ProtoBuf.load("type.proto", this.onProtoLoaded);     ProtoBuf.load("Lobby/...

来源: Laya_社区 发布时间: 20170911

14. 网络和格式-ProtocolBuffer [ 87%]

...res/protobuf/awesome.proto", onAssetsLoaded); function onAssetsLoaded(err, root) { if (err) throw err; // Obtain a message type var AwesomeMessage = root.lookup("awesomepackage.AwesomeMessage"); // Create a new message var message = AwesomeMessage.create( { awesomeField: "AwesomeString" }); // Verif...

来源: Laya_示例 发布时间: 20250312

15. 网络和格式-ProtocolBuffer [ 87%]

...res/protobuf/awesome.proto", onAssetsLoaded); function onAssetsLoaded(err, root) { if (err) throw err; // Obtain a message type var AwesomeMessage = root.lookup("awesomepackage.AwesomeMessage"); // Create a new message var message = AwesomeMessage.create( { awesomeField: "AwesomeString" }); // Verif...

来源: Laya2.0_示例 发布时间: 20250312

16. Xml加载错误 [ 87%]

...信 q1402907210 - 你猜猜 赞同来自: var xmlValueContainsError = "<root><item>item a</item><item>item b</item>somethis...</root1>";  var xmlValue = "<root><item>item a</item><item>item b</item>somethings...</root>"; 这两...

来源: Laya_社区 发布时间: 20170512

17. 微信小游戏运行导出项目的时候报错:Scene: the .lh file root type must be Scene [ 86%]

微信小游戏运行导出项目的时候报错:Scene: the .lh file root type must be Scene 引擎使用的是1.7.17beta版本,下面是报错堆栈,附件是工程项目以及导出的小游戏项目。 Scene: the .lh file root type must be Scene,please use other function to  load  this fil...

来源: Laya_社区 发布时间: 20180317

18. 写入时,对不上位置 [ 84%]

...看这个问题,目前最简单的解决方法就是在舞台下添加个root容器。然后移动root king • 2017-07-17 17:11 @Monica:大屏居中 、不加这个Laya.stage.scaleMode = Stage.SCALE_FIXED_HEIGHT; 就没法显示全部,还怎么root king • 2017-07-17 17:15 @Monica: https://ldc...

来源: Laya_社区 发布时间: 20170713

19. 继承Scene没有onEnable [ 82%]

...会有onAwake         let t = new tt();         Laya.Scene.root.addChild(t);     } } //激活启动类 new Main();  class tt extends Laya.Node{     constructor(){         super();     }     public onAwake():void{         console.log(1111);     } }...

来源: Laya_社区 发布时间: 20190701

20. 微信小游戏分包实战(JavaScript-小游戏适配文档-微信小游戏) [ 81%]

...分包路径的字段 ```json { ... "subpackages": [ { "name": "stage1", "root": "stage1/" // 可以指定一个目录,目录根目录下的 game.js 会作为入口文件,目录下所有资源将会统一打包 }, { "name": "stage2", "root": "stage2.js" // 也可以指定一个 JS 文件 } ] ......

来源: Laya2.0_文档 发布时间: 20210715