From 3ec0e1986f5580bbe83f2d1a1dd8a022475b8ac0 Mon Sep 17 00:00:00 2001 From: owen <1053210246@qq.com> Date: Mon, 19 Aug 2019 14:43:41 +0800 Subject: [PATCH] Refine native particle logic (#1796) --- native/cocos/editor-support/particle/ParticleSimulator.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/native/cocos/editor-support/particle/ParticleSimulator.cpp b/native/cocos/editor-support/particle/ParticleSimulator.cpp index 29de7b8e6e..d1e2912190 100644 --- a/native/cocos/editor-support/particle/ParticleSimulator.cpp +++ b/native/cocos/editor-support/particle/ParticleSimulator.cpp @@ -213,13 +213,13 @@ void ParticleSimulator::onDisable() void ParticleSimulator::render(float dt) { - // uv size must equal 8,because per particle has 4 vertex. - if (_uv.size() != 8) + if (_finished || _nodeProxy == nullptr || _effect == nullptr) { return; } - if (_nodeProxy == nullptr) + // uv size must equal 8,because per particle has 4 vertex. + if (_uv.size() != 8) { return; }