Particle burst with exact amount of particles

Hello dear forum,

I need to emit an exact amount of particles from a SCNParticleSystem in a burst (this is for an UI effect). This worked for me perfectly in the scene editor by setting the birthrate to the amount and emission duration to 0.

Sadly when I either load such a particle system from a scene or creating it by code, the emitted particles are sometimes one less, or one more.

The first time I run it in the simulator, it seems to work fine but then amount of particles varies as described.

video: https://youtube.com/shorts/MRzqWBy2ypA?feature=share

Does anybody know how to make this predictable?

Thanks so much in advance,

Seb

Particle burst with exact amount of particles
 
 
Q