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

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

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 [ 87%]

...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. Laya.Pool可以创建模型数据导入的Sprite3D吗? [ 77%]

...提交 1 个回复 Benjamin87v5 赞同来自: 自己找到个方法,pool.getItemByCreateFun,试试看 2018-04-18 0 0 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 Benjamin87v5 相关问题 加载到舞台的3D模型不显示贴图 从un...

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

7. layabox打包apk后加载prefab之后使用pool创建prefab找不到create函数 [ 74%]

...function (obj: any) {             let prefab = Laya.Pool.getItemByCreateFun('prefab_' + name, obj.create,obj);               Laya.stage.addChild(prefab);             prefab.pos(100,100);         }),null,Laya.Loader.PREFAB); 如上,obj.create...

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

8. 请问一下怎样动态加载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

9. TypeError: Cannot read property 'length' of null [ 70%]

...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

10. box2d引擎报错问题 [ 69%]

...d") { Laya.Tween.clearAll(this._sp) let effect: Laya.Animation = Laya.Pool.getItemByCreateFun("deathEffect", this.createEffect, this); effect.pos(this._sp.x, this._sp.y); this._sp.parent.addChild(effect); effect.play(0, false); this.owner.removeSelf(); Laya.Pool.recover("flyCat", this.owner) } } cre...

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