大约有 7 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0029 秒)
...擎中,组件和系统的职责融合在组件脚本(即继承自 Laya.Script 的类)中体现: 组件部分:通过类中的属性字段或访问器承担组件的数据职责,通常使用 @property() 装饰器标记这些字段,将其暴露到IDE属性面板,方便开发者进行可...
来源: Laya3.0_文档 发布时间: 20251010
...动实体行为。 当开发者继承了 LayaAir 组件脚本类( Laya.Script )后,即可使用引擎提供的一系列生命周期方法(如 onAwake、onEnable、onUpdate 等)和事件响应方法(如 onMouseDown、onMouseClick 等)。这些内置方法作为组件脚本的逻辑执...
来源: Laya3.0_文档 发布时间: 20251010
...shRenderer' has been destroyed but you are still trying to access it. Your script should either check if it is null or you should not destroy the object. n.a (UnityEngine.SkinnedMeshRenderer A_0, System.String A_1, System.Boolean A_2) (at <f23f19a62c944610ba98639869d48a79>:0) n.b () (at <f2...
来源: Laya_社区 发布时间: 20210607
...shRenderer' has been destroyed but you are still trying to access it. Your script should either check if it is null or you should not destroy the object. n.a (UnityEngine.SkinnedMeshRenderer A_0, System.String A_1, System.Boolean A_2) (at <f23f19a62c944610ba98639869d48a79>:0) n.b () (at <f2...
来源: Laya_社区 发布时间: 20210607
... { regClass, property } = Laya; @regClass() export class Main extends Laya.Script { onStart() { console.log("Game start"); } } 2.2 场景的脚本说明 前面讲了项目的入口, 本小节简述一下场景的脚本。场景的脚本主要是两类, 一类是自定义的组件脚本。这种...
来源: Laya3.0_文档 发布时间: 20251103
...代码如下所示: const { regClass } = Laya; @regClass() export class Script extends Laya.Script { } 1.2 IDE中如何找到被识别的组件脚本 只有使用了@regClass()装饰器标识,才会被LayaAir3-IDE识别为自定义组件脚本,可以被节点(实体)所添加, 添加组...
来源: Laya3.0_文档 发布时间: 20251010
...击操作,IDE会弹窗提示创建UI组件脚本文件,默认是RuntimeScript.ts,开发者可以对其进行重命名,最后点击保存即可创建脚本。 (动图2-1) 可以看到,创建以后,除了生成RuntimeScript.ts之外,在项目工程中看到还多了一个 RuntimeScri...
来源: Laya3.0_文档 发布时间: 20251010