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

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

1. ts 用 getChildByName 返回类型出错 [ 100%]

ts 用 getChildByName 返回类型出错 ts 用 getChildByName 返回类型是laya.display.Node 如果返回的其实是 Text, 把它赋值给一个Laya.Text 编辑器就报错 这个怎么解决 var text:Laya.Text = someNode.getChildByName('textName'); [ts] Type 'Node' is not assignable to type ...

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

2. let btn:Button = cell.getChildByName("button的name"); [ 97%]

let btn:Button = cell.getChildByName("button的name"); import Button = laya.ui.Button; let itemBtn:Button = cell.getChildByName("mItemBtn");  这样会报一个错:Type "Node" is not assignable to type "Button". Property "toggle" is missing in type "Node"; 对着官网list例子做的,不知...

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

3. parameter 2 is not of type 'WebGLTexture'. [ 94%]

...oElement.load('res/video/mov_bbb.mp4'); // 添加到舞台 let wrap = this.getChildByName('wrap') as Laya.Box; wrap.addChild(videoElement); // 监听点击事件,开始播放视频 let btn_start = this.getChildByName('btn_start') as Laya.Image; btn_start.on(Laya.Event.CLICK,this,()=>{ // 加载...

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

4. 角色碰撞器添加复合型碰撞形状,报错Qt[a[((a[(t >> 2)] + 8) >> 2)]] is not a function [ 92%]

...    <<<<<<<<报错: //飞机 let plane = scene.getChildByName("plane") as Laya.MeshSprite3D; let character: Laya.CharacterController = plane.addComponent(Laya.CharacterController);  let collider_shape_box = new Laya.BoxColliderShape(2.5, 0.8, 0.8); collider_shape_box.loc...

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

5. 如何为list内部的button添加事件 [ 88%]

...交 2 个回复 cuixueying 赞同来自: 你可以通过list.getItem(xxx).getChildByName(),通过button的name属性得到button的引用,为button添加点击事件。 2017-01-05 0 3 分享 微博 QZONE 微信 weiyongwill 赞同来自: 这样需要用for语句对每个list元素操作一遍? ...

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

6. LookAt又出bug了,官方赶紧看看是不是代码合漏了 [ 88%]

...来自: 直接unity里面预览,控制台输入Laya.stage.getChildAt(0).getChildByName("A").transform.lookAt(Laya.stage.getChildAt(0).getChildByName("B").transform.position,new Laya.Vector3(0,1,0),false,false)  指向错误   下面两句修正方向 Laya.stage.getChildAt(0).getChildByName("A")....

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

7. ReferenceError: Laya3D is not defined? [ 84%]

...Laya.stage.addChild(scene) as Laya.Scene3D; var camera:Laya.Camera = scene.getChildByName("Main Camera") as Laya.Camera; //camera.addComponent(CameraMoveScript); })); 2019-03-08 添加评论 悬赏 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 0 ...

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

8. 报错了没搞懂 [ 82%]

报错了没搞懂 this.getchildByName is not a function 附件 : --> 2017-11-27 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 2 个回复 ymsdandan 赞同来自: getchildbyname只能通过他的父节点来获取 2017-11-2...

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

9. destroy 报错 [ 81%]

... {                 let floor1:Laya.Sprite3D = this.scene.getChildByName("floor"+floor+i) as Laya.Sprite3D;                 if(floor1)                 {                     floor1.destroy();                     c...

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

10. destroy 报错 [ 81%]

... {                 let floor1:Laya.Sprite3D = this.scene.getChildByName("floor"+floor+i) as Laya.Sprite3D;                 if(floor1)                 {                     floor1.destroy();                     c...

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