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

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

111. 2.0使用addComponent的组件,怎么删除?没有removeComponent [ 67%]

... 2019-02-16 16:24 (this.player.getComponent(playerScript) as playerScript).destroy(); 或者 this.player._destroyComponent(this.player.getComponent(playerScript));

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

112. drawToCanvas的问题 [ 67%]

...,256,0,0); //img.loadImageSource(html.source,true); //html.clear(); //html.destroy(); mat.albedoTexture.destroy(); // 先删除旧的 mat.albedoTexture = tex.bitmap; // 再设置新的 // 可以用 drawtotexture这种方式 // 这种比drawToCanvas效率要高,但是其实依然不适合这种不...

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

113. [LayaNative3]new CommondBuffer 没有回收释放,每次用完,直接给置成null,每次buffermemory都会增长,不会下降 [ 67%]

...把对象拥有的变量给销毁了,如下: this._instanceBufferState.destroy(); this._instanceBufferState = null;但是在下次Create的时候因为是从池子中拿出来的,所以 this._instanceBufferState 没有了 附件 : --> 归档.zip 2025-07-17 添加评论 免费帖 --> 分享 ...

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

114. 2.0下资源加载和销毁内存问题 [ 67%]

...E 微信 Laya_Aaron 赞同来自: (getRes(“xxx”) as Laya.Resource).destroy 2019-04-29 0 2 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 虎威 相关问题 laya针对页游耗用内存大的问题是如何解决的? 加载到舞...

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

115. 使用Image的时候,资源引用计数一直增加,导致清理不掉 [ 66%]

...3 个回复 layabox小高 赞同来自: 想要彻底释放要用clearRes,destroy不能完全的销毁资源,因为考虑到后续可能还会有别的地方引用资源。 2023-08-16 0 1 分享 微博 QZONE 微信 1560480692用户 赞同来自: 你是2.1的版本 2023-08-29 0 1 分享 微博 QZO...

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

116. laya3.0 [场景管理] 关闭场景 显存并未下降 [ 66%]

...候把场景1的资源丢弃。 做法1.两个场景的Scene2D属性Auto Destroy At Closed 都勾选 场景1跳转场景2的代码       private onynYesBtn(evt: Laya.Event): void {         console.log("[BtnClick] [onynYesBtn!]");         //this.yn_board_Cc.selectedIndex = 0;         ...

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

117. 在Canvas模式下 drawTexture出错 [ 66%]

...GL模式下正常 Canvas模式下 在短时间内连续调用drawTexture和destroy会报错 Uncaught TypeError: Failed to execute 'drawImage' on 'CanvasRenderingContext2D': The provided value is not of type '(CSSImageValue or HTMLImageElement or SVGImageElement or HTMLVideoElement or HTMLCanvasEleme...

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

118. 帮忙看看Texture类getPixels内存泄漏的问题。 [ 66%]

...itPixelCount < 0.3) { trace("remove"); _htmlCanvas.clear(); _htmlCanvas.destroy(); _tex.destroy(); _colorSpr.off(Event.MOUSE_MOVE, this, __moveHandler); } } private function getPixel(tex:Texture):int { var pixelCount:int = 0; /************getPixels内存泄漏*************/ var arr:Array = tex.ge...

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

119. 颜色滤镜 差值变化 [ 66%]

...er(): Laya.ColorFilter { return this.colorFilterNone(0xffffff); }  public destroy() { if (this.targets != null) { this.targets = null; } ColorTool.instance = null; } } }     用法 let sp:Laya.Sprite=new Laya.Sprite(); ColorTool.getInstance().addColorTarget(sp); ColorTool.getInstance().targetsCha...

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

120. laya.d3.core.light.LightSprite_API3.0 [ 66%]

...e tag WORLDINVERTFRONT Accessors active activeInHierarchy color components destroyed displayedInStage hideFlags id intensity is3D layer lightWorldMatrix lightmapBakedType mode numChildren parent scene shadowDepthBias shadowDistance shadowMode shadowNearPlane shadowNormalBias shadowResolution shadowS...

来源: Laya3.0_api 发布时间: 20231115