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

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

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

...资源不会缓存,只能在加载完成的回调里使用,无法通过getRes读取加载缓存。 使用fetch()方法,示例如下: onEnable(): void { const jsonPath: string = "json/bagList.json"; //fetch取到的是原始数据,但没有缓存,无法用getRes获取 Laya.loader.fetch(js...

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

82. 循环添加一组按钮事件无法正常使用 [ 69%]

...Loc[i][1]);                 b.graphics.drawTexture(Laya.loader.getRes(Res),tx-45,ty-45);                 b.size(92,96);                 b.name = "egg"+i;                 Laya.stage.addChild(b);                 b.on(Event.MOUSE_DOWN, this, m...

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

83. 鼠标交互-Hold [ 68%]

...猩 ape = new Sprite(); ape.loadImage(apePath); var texture = Laya.loader.getRes(apePath); ape.pivot(texture.width / 2, texture.height / 2); ape.pos(Laya.stage.width / 2, Laya.stage.height / 2); ape.scale(0.8, 0.8); Laya.stage.addChild(ape); // 鼠标交互 ape.on(Event.MOUSE_DOWN, this, onApePress)...

来源: Laya_示例 发布时间: 20251130

84. getimagedata直接调用无法获取有效像素问题 [ 68%]

...reate(this, function()         {             var t = Laya.loader.getRes("../../res/apes/monkey2.png");             var ape = new Sprite();             ape.graphics.drawTexture(t, 0, 0);             Laya.stage.addChild(ape);             ape.pos(200, 0);         ...

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

85. layabox加载fairygui发布的二进制文件报错 [ 68%]

...elete LoaderManager._resMap[url]; if (resInfo.originalUrl){ content=Loader.getRes(resInfo.originalUrl); } resInfo.event(/*laya.events.Event.COMPLETE*/"complete",content); resInfo.offAll(); this._infoPool.push(resInfo); this._statInfo.loaded++; this.event(/*laya.events.Event.PROGRESS*/"progress",this...

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

86. 疑似clearRes内存泄漏问题 [ 68%]

...03-08 0 2 分享 微博 QZONE 微信 Laya_Aaron 赞同来自: (Laya.Loader.getRes(this.picUrl) as Laya.Resource).destroy(); picUrl 就是你的资源地址 2019-03-08 0 3 分享 微博 QZONE 微信 尔东 赞同来自: clearRes的时候是默认参数,也就是最终执行到destroy的时候,还...

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

87. 加载unity导出的.lh文件报错! [ 68%]

...化加载并创建好的3D对象var sprite3D:Laya.Sprite3D = Laya.loader.getRes("res/room.lh");this.scene.addChild(sprite3D);} 2018-09-08 0 0 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 130*****543 相关问题 unity导出粒子文件问...

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

88. 鼠标交互-Hold [ 68%]

...ape = new Sprite(); this.ape.loadImage(apePath); let texture = Laya.loader.getRes(apePath); this.ape.pivot(texture.width / 2, texture.height / 2); this.ape.pos(Laya.stage.width / 2, Laya.stage.height / 2); this.ape.scale(0.8, 0.8); Laya.stage.addChild(this.ape); // 鼠标交互 this.ape.on(Event.MOU...

来源: Laya2.0_示例 发布时间: 20251130

89. Laya2.0版本linkSprite3DToAvatarNode无法正常使用了,因为新插件导出的动画没有avatar文件了,导致挂载不上 [ 68%]

...GameUI.ts 41行下断点调试进入查看。   var actor = Laya.Loader.getRes("res/LayaScene_Actor/Conventional/XiaoHongMao.lh") as Laya.Sprite3D; var weapon = Laya.Loader.getRes("res/LayaScene_Item/Conventional/Wchangzhang01.lh") as Laya.Sprite3D; var animCtl = actor.getComponent(Laya.Animator);...

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

90. [LayaAir3]Spine释放后,纹理不会被释放掉 [ 68%]

...          let pngUrl = texture.realTexture.url; let res = Laya.loader.getRes(pngUrl);         if (res && res._bitmap instanceof Laya.Texture2D) {             res._bitmap.destroy();         }         Laya.loader.clearRes(pngUrl)            }     } tmpDat.destroy...

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