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

大约有 61 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0036 秒)

31. 新人求助:onStart赋值为什么在onUpdate会输出一次为空 [ 72%]

...  }     onStart():void{                this.lab=this.owner as Laya.Label;         }         onUpdate():void{         if(this.lab==null){             console.log("lab为空");             return;         }         t...

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

32. 资源加载 · LayaAir3.3 · 引擎文档 · LAYABOX [ 72%]

...// img.skin = url; //ui组件直接设置skin也可以 img.pos(x, y); this.owner.addChild(img); }); } } 1.2 带类型的加载方式 有的时候,网络资源没有后缀名,又或者,图片xxx.png并非是当成Texture使用,需要被定义为TextureCube。所以,这些时候需要通过...

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

33. Laya3D 中如何解决3D模型上添加文本的问题,类似Unity中的3DText [ 72%]

...Script{ public title: string; constructor(){ super(); } public _initialize(owner: Laya.Sprite3D): void { super._initialize(owner); var sprite3D = this.owner as Laya.MeshSprite3D; var sprite3DMat = new Laya.StandardMaterial(); sprite3DMat.cull = Laya.BaseMaterial.CULL_NONE; var imageData = this.canva...

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

34. 动画混合问题,Avatar动画混合报错. [ 71%]

... public animator:Laya.Animator = null;  public Init(){ 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(...

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

35. 用raycast选取实体,hitresult始终是false [ 71%]

...撞到的物体 // this.text.text = "碰撞到了" + outHitResult.collider.owner.name; console.log("碰撞到物体!!" + outHitResult.collider.owner.name) } 附件 : --> 射线选取实体的问题.zip 2019-12-19 添加评论 已悬赏10元 --> 分享 微博 QZONE 微信 没有找到相关结果...

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

36. [LayaAirIDE3]如何TextArea屏蔽掉右键的快捷菜单 [ 70%]

...his.enableRightClick();         //禁用Ctrl+c,Ctrl+v         this.owner.on("keydown", this, (event: KeyboardEvent) => {             if (event.ctrlKey && event.key === "c") {                 event.preventDefault();             }             if (event.ctrl...

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

37. 使用二进制图片 · LayaAir3.0文档 · LAYABOX [ 70%]

... //加载Base64图片数据 sp1.loadImage(e.target.result as string); this.owner.addChild(sp1); } }); 上述代码中,用 Laya.loader.fetch 加载图片二进制数据,根据自定义的规则,可以解析数据加密方式,并获得完整图片数据。在这里我们更多的介绍一下 L...

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

38. [LayaAir3]clickHandler只会执行一次,之后点击不再触发 laya.3.0.9 [ 69%]

...                let btn:Laya.Button = LayaUtil.GetChildByPath(this.owner, "CreatePanel/BtnCreate");                 btn.clickHandler = Laya.Handler.create(this, this.onClickCreate)                 this.drawGrid();     }      onClickCreate()     {         // ()=>...

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

39. 精灵 · LayaAir3.3 · 引擎文档 · LAYABOX [ 69%]

...= Laya; @regClass() export class NewScript extends Laya.Script { //declare owner : Laya.Sprite3D; @property({ type: Laya.Sprite }) public sprite1: Laya.Sprite; @property({ type: Laya.Sprite }) public sprite2: Laya.Sprite; constructor() { super(); } /** * 组件被激活后执行,此时所有节点...

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

40. [LayaAir3]3.3.2与设置组件灰显相关的 Bug 和 Crash [ 68%]

...date(normalizeTime: number): void { const sp = this.playStateInfo.animator.owner as Laya.Sprite; sp.graphics.repaint(); } } 修改后的完整源码见附件。 LayaTest2.zip 2025-10-27 0 0 分享 微博 QZONE 微信 lv 赞同来自: layabox 崩溃问题会在3.3.3版本修复 2025-10-17 1 0 分享 ...

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