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

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

1. 调用 Laya.Pool.getItemByCreateFun 时报错 [ 100%]

调用 Laya.Pool.getItemByCreateFun 时报错 调用 Laya.Pool.getItemByCreateFun 时报错 附件 : --> 2019-03-03 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回复 Laya_Aaron 赞同来自: 建议参照2d新建示...

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

2. 调用 Laya.Pool.getItemByCreateFun 报错 [ 99%]

调用 Laya.Pool.getItemByCreateFun 报错 /** @prop {name:rolePrefabs, tips:"英雄角色", type:Vector, xCount:1, sType:Prefab}*/ public rolePrefabs: Laya.Prefab[]; //TODO 报错 let role2 = Laya.Pool.getItemByCreateFun("role", this.rolePrefabs[0].create, this.rolePrefabs[0]); 附件 : --> BugRea...

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

3. [LayaAir3]Laya.Pool.getItemByCreateFun使用问题,求解 [ 97%]

[LayaAir3]Laya.Pool.getItemByCreateFun使用问题,求解 调用了两次创建对象,为啥第二次获取这个对象池的长度是0呢? 附件 : --> 2024-05-21 8 条评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 0 个回...

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

4. Pool 使用 Laya.Prefab [ 77%]

...Laya.Prefab public targetBox:Laya.Prefab; let box: Laya.Sprite = Laya.Pool.getItemByCreateFun("ItemBox", this._control.targetBox.create, this._control.targetBox); 运行报错: Cannot read property 'create' of undefined targetBox又在 control里面引用一个Prefab 2019-08-26 添加评论 免费...

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

5. 在加载包含Animation的prefab后,动画没有显示 [ 77%]

...f:Laya.Prefab = new Laya.Prefab(); gkpref.json = pref; var OBJ = Laya.Pool.getItemByCreateFun("gk2v1",gkpref.create,gkpref); this.Scene.addChild(OBJ); })); 附件 : --> ZMW.zip 2020-10-22 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链...

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

6. 请问一下怎样动态加载prefab [ 73%]

...坛中也查找了一些做法  1.    let box: Laya.Sprite = Laya.Pool.getItemByCreateFun("dropBox", this.dropBox.create, this.dropBox); 这个会在create的时候报错 2. prefab:Prefab = Laya.Load.getRes("prefab/xxx"); 这个获取prefab直接就是个空   请问一下 这个到底是怎么...

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

7. TypeError: Cannot read property 'length' of null [ 66%]

...hero.prefab,b场景也包含预制体hero.prefab 在a场景通过Laya.Pool.getItemByCreateFun("hero", this.pHero.create, this.pHero)创建对象,同时给对象设置位置,成功 跳转到b场景后,通过Laya.Pool.getItemByCreateFun("hero", this.pHero.create, this.pHero)获取这个对象时,...

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

8. 对象池使用问题 [ 62%]

...对象能理解;但是根据函数获取对象不懂;方法是这个 getItemByCreateFun(sign:String, createFun:Function):*不知道怎么用;请大家指导 2017-02-04 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 ...

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

9. 动画加载完成的监听是怎样写? [ 62%]

动画加载完成的监听是怎样写? let fly = Laya.Pool.getItemByCreateFun("fly", this.fly, this); owner.addChild(fly); fly.play(0, true, "ani1");   fly() { let ani = new Laya.Animation(); ani.loadAnimation("plaen4.ani"); return ani; }   这样写是可以正常播放,但是会有这个...

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

10. laya的prefab都没有明确生成使用资料 [ 61%]

...,都没说。唯一的demo就一句: let box: Laya.Sprite = Laya.Pool.getItemByCreateFun("dropBox", this.dropBox.create, this.dropBox);天啊,this.dropBox都没有初始化,怎么知道是dropbox那个呢??? 2019-09-07 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到...

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