ParticleEmitter leaving particles in scene after being killed #3254
Replies: 1 comment 1 reply
-
Hi @kyletcooper! Apologies on the delay I'm catching up from last week. I don't see anything that looks wrong in the code. However there was a memory leak in v0.29.3 particles that would definitely contribute to perf degradation, In theory the latest alpha bits have fixed this by correctly pooling particles.
This is a good question, currently the ParticleEmitter does not remove spawned particles when removed from the scene (perhaps it should, I'll look into making this change). It does look like there is a bug where particles don't clean up properly if their emitter is removed before their life runs out 😱 I'll make an issue and get this fixed ASAP |
Beta Was this translation helpful? Give feedback.
-
I'm having an issue using the ParticleEmitter in my endless wave game. As the rounds progress the performance is getting worse and I noticed that in engine.currentScene.entities contains a lot of particles that are never getting removed.
Here's what I think my code is doing:
Is the ParticleEmitter meant to remove it's particles when it's killed or am I misusing this? I had assumed that the particleLife property was used to have the particles automatically remove themselves after they're finished.
Beta Was this translation helpful? Give feedback.
All reactions