大约有 194 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0040 秒)
...对,建议看看官网示例,附下正确代码 this.role = scene3D.getChildByName("Cube") as Laya.MeshSprite3D; let phy: Laya.PhysicsCollider = this.role.addComponent(Laya.PhysicsCollider) as Laya.PhysicsCollider; let mesh:Laya.Mesh = Laya.loader.getRes("res/Conventional/Library/unity defa...
来源: Laya_社区 发布时间: 20191026
...e.addChild(scene) as Scene3D; //获取cube对象 var cube:Sprite3D = scene.getChildByName("Cube"); //添加组件(脚本) var _script:SceneScript = cube.addComponent(SceneScript); //label用于显示 var _lab:Label = new Label(); _lab.text = "test"; _lab.height = 100; _lab.width = 100; _lab.fontSize...
来源: Laya2.0_文档 发布时间: 20210715
... { let floor1:Laya.Sprite3D = this.scene.getChildByName("floor"+floor+i) as Laya.Sprite3D; if(floor1) { floor1.destroy(); c...
来源: Laya_社区 发布时间: 20180514
...lone contains destroy destroyChildren event frameLoop frameOnce getChildAt getChildByName getChildIndex getComponent getComponents hasHideFlag hasListener isAncestorOf off offAll offAllCaller on onAfterDeserialize onAwake onDestroy onDisable onEnable once removeChild removeChildAt removeChildByName ...
来源: Laya3.0_api 发布时间: 20231115
...imer contains destroy destroyChildren event frameLoop frameOnce getChildAt getChildByName getChildIndex getComponent getComponents hasHideFlag hasListener isAncestorOf off offAll offAllCaller on onAfterDeserialize onAwake onDestroy onDisable onEnable once removeChild removeChildAt removeChildByName ...
来源: Laya3.0_api 发布时间: 20231115
...cene:Scene3D):void { Laya.stage.addChild(scene); var camera:Camera = scene.getChildByName("Main Camera") as Camera; camera.addComponent(CameraMoveScript); })); ```
来源: Laya2.0_文档 发布时间: 20210714
...ate(this, function(scene) { Laya.stage.addChild(scene); var camera = scene.getChildByName("Main Camera"); camera.addComponent(CameraMoveScript); })); ```
来源: Laya2.0_文档 发布时间: 20210715
...ate(this, function(scene) { Laya.stage.addChild(scene); var camera = scene.getChildByName("Main Camera") as Laya.Camera; camera.addComponent(CameraMoveScript); })); ```
来源: Laya2.0_文档 发布时间: 20210715
...取了粒子作为Sprite3D,这个可以获取到this.bow = this.scene3D.getChildByName("Bow") as Laya.Sprite3D; 然后我拿不到他的粒子系统,var par: Laya.ShurikenParticleSystem= this.bow.getComponent(Laya.ShurikenParticleSystem);结果是空的,求教一下! 2018-12-18 添加评论 ...
来源: Laya_社区 发布时间: 20181218
...你的问题,可以直接通过var就可以获取,name还需要通过getChildByName获取。
来源: Laya_社区 发布时间: 20180901