You are setting the duration field. That’s how long the system emits for before it loops back around. If you want the emitted particles to remain then you need to set the start lifetime field. The max value is 100000, but that is over 27 hours. Seems like a long game
Alternatively you could write a script that goes through all the particles and resets the lifetime values so they never die.
Thanks, its for an installation so it does need to run for at least 24hrs. Anyways, setting the start lifetime to infinity doesn’t seem to have the intended effect. The particle effect still ends after about 5-10 seconds. I also tried extending the ‘Duration’ value, but that had no effect. Could you possibly have a look and suggest what else may be causing this?
You cant set the lifetime value to infinite, it has to be a number. Set it to 100,000 and use a script to reset the lifetime every so often: Unity - Scripting API: ParticleSystem.Particle.lifetime
The duration value should be fine as default, its just the lifetime that matters.
Out of curiousity, and as one programmer to another, could you please explain why the maximum is such an arbitrary number? why 100,000? Couldn’t you please put in a special value to allow eternal particles?
And can you please explain the relationship between startLifetime and startLifetimeMultiplier ?
And please, Unity, please dont assume anything about the types of projects we are making - we are not all making games. For some of us, 27 hours is not long at all.
That’s not the maximum value it was just an example of a very large value that would last some time. Good news though, we do support infinite lifetime particles now. If you assign infinite to the particle lifetime it will now last indefinitely, this of course means that if your particles are using any sort of curves that are based on lifetime they will only ever sample the left side of the curve. I will make sure we add a note about the infinite particle support to the scripting docs.
startLifetimeMultiplier only applies to the curve mode. The curve stores keys in the range -1 to 1. We sample the curve and multiply by the multiplier value to get the final result. This means you can easily scale a curve by simply changing the multiplier. Its also better for scripting performance if you want to change the value often as we only need to pass a float between C# to C++ instead of the MinMaxCurve.