From 53c69608f37f16f59a802f0ff9cf6b6a0eb8bb12 Mon Sep 17 00:00:00 2001 From: nishimura998 Date: Tue, 15 Oct 2024 23:45:31 +0900 Subject: [PATCH] Update render-data.ts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit render2dBuffer会出现未定义,导致断言的时候发生异常无法正常渲染界面 --- cocos/2d/renderer/render-data.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cocos/2d/renderer/render-data.ts b/cocos/2d/renderer/render-data.ts index e8578db0a28..696d19d044f 100644 --- a/cocos/2d/renderer/render-data.ts +++ b/cocos/2d/renderer/render-data.ts @@ -483,7 +483,7 @@ export class RenderData extends BaseRenderData { // Hack Do not update pre frame if (JSB && this.multiOwner === false) { - if (DEBUG) { + if (DEBUG&&this._renderDrawInfo.render2dBuffer) { assert(this._renderDrawInfo.render2dBuffer.length === this._floatStride * this._data.length, 'Vertex count doesn\'t match.'); } // sync shared buffer to native