Particle System doesnt play unless prewarm is selected

using particle.Play(); and stop to stop and start a wake behind my boat
but it doesnt play unless the pre-warm check is on.

I dont really want this as bubbles shoot out without the player moving controls.
Why does this happen?

Hey Epoch, I never start/stop my particles… back when I did I always seemed to have weird edge case issues.

Instead I just get their EmissionModule and set their emission from zero to whatever maximum I set up in the particle system originally. I usually just copy that maximum out at Start(), then my script changes it in the instance (not the prefab!) according to gameplay.

If you like you can also set the .enabled property on the EmissionModule.

Here’s my ultra-generic emit-over-time controller as part of my Datasacks class. It maps the internal contents of a datasack (basically a global variable) as a fraction of 0.0 to 1.0 to the specified emit-over-time rate of the particle system.

Line 49 to 51 set it up and grab the emission rate you set in project

Line 58 sets the value as a fraction of that. Replace ds.fValue with your own percent.

1 Like

So do you just attach this script to any object that requires a particle system?
Thanks for that!

You do if you’re using the datasacks system AND you’re using it to control particles, which I doubt you are.

Otherwise, consider it an example of obtaining the emit value at start, then scaling it when it changes.

1 Like