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

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

11. box2d动态创建绑定多个关节报错 Node:the component is singleton,can't add the second one. [ 73%]

...long to other node.";         if (comp.isSingleton && this.getComponent((comp).constructor))             throw "Node:the component is singleton,can't add the second one.";         this._addComponentInstance(comp);         return comp;     }   暂时...

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

12. bug,ChainCollider.points第二次设置,会报错! [ 73%]

...0,0,100,0)确实不会报错,但如果是已存在,比如先设置sp.getComponent(ChainCollider).points = "25,25,50,50";运行后,再改变值时(如果一次运行中连续赋值2次,是不会报错的,必须执行再赋值),就会报错。 如下使用2d示例项目中代码,改写...

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

13. dialog弹窗不居中(laya2.0.0beta5) [ 71%]

...是继承Laya.Dialog的,无法像Laya.scene那样加控制脚本,this.getComponent(xx),取不到控制类,何解?

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

14. [0]Laya3.0.3 的VideoNode不支持在微信浏览器中播放 [ 66%]

...oTexture; this.owner.xxx.getChildByName('Scene3D').getChildByName('Plane').getComponent(Laya.MeshRenderer).sharedMaterial = mat; // 上面代码在3D场景中播放则无任何问题,包括微信浏览器,出问题的是在2D场景中在微信浏览器不能播放视频   // 附件三张图片...

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

15. 碰撞器获取问题 [ 66%]

...碰撞器就获取不到了,一直报空 (this.owner as Laya.Sprite3D).getComponent(Laya.PhysicsCollider) as Laya.PhysicsCollider;log里面也没有这个碰撞组件的信息,只有刚体和脚本的 但是把刚体去掉以后再导出,代码再去获取这个物体身上的碰撞器就...

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

16. 实体组件系统 · LayaAir3.0文档 · LAYABOX [ 65%]

...每帧更新时执行,尽量不要在这里写大循环逻辑或者使用getComponent方法 onLateUpdate 每帧更新时执行,在onUpdate之后执行,尽量不要在这里写大循环逻辑或者使用getComponent方法 onPreRender 渲染之前执行 onPostRender 渲染之后执行 onDisable ...

来源: Laya3.0_文档 发布时间: 20240528

17. 如何通过代码控制prefab上面的时间轴动画animation? [ 64%]

... callback.run(); }); } ... // 外部访问 ... let puzzleSoldier = soldier.getComponent(PuzzleSoldier) as PuzzleSoldier; puzzleSoldier.attack(); ... 2019-02-15 0 0 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 该问题目前已经被锁定, 无法添加新回复 发起人 138*...

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

18. 两个物体 ,如果在update里修改其中一个物体的rotationEuler,会触发另一个物体的onTriggerEnter回调 [ 62%]

...te3D(pBull, "bull"); let pBullRigidBody = <Laya.Rigidbody3D>pBullObj.getComponent(Laya.Rigidbody3D) pBullRigidBody.isKinematic = true; let pEnemyObj = Util3d.getSprite3D(pEnemy, "man_1"); let pEnemyRigidBody = <Laya.Rigidbody3D>pEnemyObj.getComponent(Laya.Rigidbody3D) pEnemyRigidBody.isK...

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

19. 动画混合问题,Avatar动画混合报错. [ 61%]

...(){ this.sprite = this.owner as Laya.Sprite3D; this.animator = this.sprite.getComponent(Laya.Animator) as Laya.Animator; console.log("11"); }  public RoleMove(dir:Laya.Vector3) { let norDir:Laya.Vector3 = Laya.Vector3.ZERO; Laya.Vector3.normalize(dir,norDir); console.log(norDir); //this.sprite.tran...

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

20. 2.0组件式开发Script间互相调用、通信的官方推荐方式是什么呢 [ 61%]

...么处理呢? 1、Script2做成static instance?   2、findeNode(Node2).getComponent(Script2).doSomeThing()? 类似这样吗,Script中有findNode类似的api吗? 2020-03-11 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提...

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