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

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

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. laya.utils.Pool_API3.0 [ 86%]

...rarchy Pool Index Methods clearBySign createByClass getItem getItemByClass getItemByCreateFun getPoolBySign recover recoverByClass Methods Static clearBySign clearBySign(sign: string): void Defined in laya/utils/Pool.ts:26 清除对象池的对象。 Parameters sign: string 对象类型标识字符...

来源: Laya3.0_api 发布时间: 20231115

5. laya.utils.Pool [ 82%]

...时,则根据传入的类型,创建一个新的对象返回。 Pool  getItemByCreateFun(sign:String, createFun:Function):*[static] 根据传入的对象类型标识字符,获取对象池中此类型标识的一个对象实例。 当对象池中无此类型标识的对象时,则使用传入...

来源: laya_api 发布时间: 20170929

6. laya.utils.Pool [ 80%]

...时,则根据传入的类型,创建一个新的对象返回。 Pool  getItemByCreateFun(sign:String, createFun:Function, caller:* = null):*[static] 根据传入的对象类型标识字符,获取对象池中此类型标识的一个对象实例。 当对象池中无此类型标识的对象时...

来源: Laya2.0_api 发布时间: 20190513

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

8. 在加载包含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

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

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