From 70220eb13e883bd073aafc81267faafec55f05ba Mon Sep 17 00:00:00 2001 From: zxx43 Date: Thu, 26 Oct 2023 17:24:18 +0800 Subject: [PATCH] [2d particle] clear renderData when reset (#16251) --- cocos/particle-2d/particle-simulator-2d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/cocos/particle-2d/particle-simulator-2d.ts b/cocos/particle-2d/particle-simulator-2d.ts index 96e68cf67b7..def8cb54fa3 100644 --- a/cocos/particle-2d/particle-simulator-2d.ts +++ b/cocos/particle-2d/particle-simulator-2d.ts @@ -140,6 +140,7 @@ export class Simulator { const particles = this.particles; for (let id = 0; id < particles.length; ++id) pool.put(particles[id]); particles.length = 0; + this.renderData.resize(0, 0); } public emitParticle (pos): void {