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

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

1. dialog弹窗不居中(laya2.0.0beta5) [ 100%]

...a_Aaron 赞同来自: 给dialog 的场景添加一个脚本,在脚本的 onStart 里面调用popup, 刚new 就调用并没有获取到宽高,时机问题导致 2018-12-12 0 1 分享 微博 QZONE 微信 风不会停 赞同来自: 有没有标准的写法? 我添加dialog添加了控制脚本,...

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

2. [LayaAir3]LAYA3IDE中勾选了弹窗显示全局错误,有些错误无法弹弹窗提示 [ 99%]

...提示 比如鼠标事件触发回调函数中有报错,Script脚本类onStart函数有报错等... 在这些函数执行中如果触发错误都只会在控制台打印错误,而不会弹出提示,因为底层代码中这些逻辑被try了catch中只打印了打印错误日志,这样会造...

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

3. 在UI类里调用启动类的静态函数失败了 [ 93%]

...structor() { super(); this.kaishi_btn.on(Laya.Event.MOUSE_DOWN, this, this.onStart); // Laya.stage.on(Laya.Event.MOUSE_DOWN, this, this.birdFly);//可以绑定两个函数 Laya.stage.on(Laya.Event.KEY_DOWN, this, this.birdFly); this.init(); } public init(): void { Laya.Tween.to(this.kaishi_btn, { y:...

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

4. [LayaAir3]V3.2 | 调试结果不一致,导致无法判断结果? [ 92%]

...a.Vector3(1, 1, 1);   @property(Laya.Camera)   camera: Laya.Camera;    onStart() {     //@ts-ignore     window.camera = this.camera;     console.log("Game start", this.camera._up);     console.log(       "Game start",       this.camera._up.x,       this.camera._up.y,       th...

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

5. 我竟然被射线检测这个小功能给难了一天了 [ 86%]

...wner.getChildByName("Main Camera") as Laya.Sprite3D).transform.position) } onStart(): void {     Laya.stage.on(Laya.Event.MOUSE_DOWN,this,this.onMouseDownCb) } private onMouseDownCb(e:Laya.Event):void{ console.log("点击屏幕") // console.log("相机位置",this.camera.) this.camera.viewportPoin...

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

6. Laya3.0正式版spine3.8的动画资源不能正常显示 [ 78%]

...e index: number = -1; public pageWidth: number; public pageHeight: number; onStart() { console.log("Game start"); Laya.loader.load("resources/res/spineboy-pma.skel", Loader.SPINE).then((templet: SpineTemplet) => { this.skeleton = new SpineSkeleton(); this.skeleton.templet = templet; this.owner.ad...

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

7. 发射射线检测不到,物体有包围盒 [ 78%]

...射射线,但是检测不到物体,物体确定加包围盒了      onStart(): void {         var self = this;             this.hitResult=new Laya.HitResult();                  Laya.Scene3D.load("res/LayaScene_game/Conventional/game.ls",Laya.Handler.create(null,function(sce...

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

8. [LayaAir3]Pool对象池获取继承对象时会返回基类对象 [ 70%]

...ss, property } = Laya; @regClass() export class Main extends Laya.Script { onStart() { let item1 = Laya.Pool.createByClass(TestClass); console.log('item1:', item1.type); Laya.Pool.recoverByClass(item1); let item2 = Laya.Pool.createByClass(TestClass2); console.log('item2:', item2.type); console.log(i...

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

9. 加载.lh文件 运行后黑屏 无法显示 [ 67%]

...        this.first = true;         this.twoFirst = true; } onStart(){ this._scene = this.owner.parent as Laya.Scene3D;         this._text = this._scene.parent.getChildByName("ceshi") as Laya.Text;         this._camera = this._scene.getChildByName("camera") as Laya.Cam...

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

10. [LayaAirIDE3]2d相机打包后问题 [ 64%]

...cript: Joystick;     private cameraController: CameraController;      onStart() {         // 初始化组件引用         this.playerScript = this.player.getComponent(Player);         this.joystickScript = this.joystick.getComponent(Joystick);         this.cameraController = th...

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