Can timeline stop emission of particles?

Hello,
I’m using timeline to orchestrate a pretty complex particle effect.

The problem I’m having is that timeline simply destroys the particle system after the clip is done, instead of letting all existing particles die on their own and then destroying the system.

In the selected track (5) I’m repeating a particle system as long as needed, when the cursor reaches the end of the clip, it instantly destroys the particle system.

I already tried all the clip options like “Control Activation”, and setting “Post Playback” to “Active” for example. But it doesn’t make a difference.

Can you file a bug report? I recently made several changes to how timeline handles particles, it’s worth looking into this as well.

1 Like

Just in case this is related.
Here’s what I think should be happening, maybe we can figure out where my approach is wrong (or maybe where there’s really a bug).

I have two tracks, one is a particle system that’s set to loop.

Track (5) selected in the screenshot has its particles “destroyed”, like there’s no wait to let the particles naturally fade out.

The second track (track 6) is a particle system that is set to not loop, but I’d like timeline to repeat the particle system anyway. That the particle system is made in a way so it emits for 0.25 seconds and then stops. If set to “looping” it would look right, but then it gets cut off by the timeline. (the particle lifetime is short in this system, so simply repeating the system itself instead of letting it loop on its own works fine; of course this is a special case, and when the particles are supposed to live much longer, this approach won’t work anymore)
The problem with this track however is, that it cannot loop. There’s no setting in the track that would allow me to override the particle systems looping mode. And when I select the track it shows “hold” when it gets extended. Probably because its gets its “loop or hold” value from the particle system. It would be nice if we could override that though.

I will try to strip down one of our scenes a lot so it still works to show the problem and then file a report.
Should I file two reports for the different cases? Or just one that deals with all of this?

I reported a bug along with a project to easily reproduce it in: 1028367

1 Like

Timeline does the looping by calculating the time and passing it into the particle system Simulate function, so it should be possible to just not loop the time value and go back to 0 after playing an iteration, although I’m a little unclear why you cant just do this with a looping particle system? Would it not be easier to create multiple control tracks for each loop point?

You’re right, it would be easier to just make it loop. The only reason why I even tried unchecking “looping” in the particle system was to try to find a workaround for the first problem. Thinking it would simply “pulse” the system once and then not cut it off.

Is there some way of doing this? I also need to make the timeline stop the particle system instead of killing it.

Is the Control Activation option enabled on the Control Clip? If you disable this option, the particle system should stop but will still be enabled.
3964339--340084--ctrlClip.png

1 Like

@anon_3785676

I tried it, but It only works for non-looped ParticleSystems. For looped, it doesn’t stop, it keeps playing.

I was able to work around this by adding a key to ParticleSystemActive and setting it on and off.

Is there any update on this issue? Seems like it’s still happening on 2018.3.0f2.

It’s a pain in the ass since instead of a simple control track, now I have to write play and stop methods and call them through keys, which is bad for timeline readability, not to mention it takes longer. Quite an ugly workaround to be honest.

1 Like

Try A adding a key to ParticleSystemActive and setting it on and off on the TimeLine. You will need to double click to edit the track on animator.

I’m also having issues with this still, ended up writing an entire custom playable track/mixer/clip system to work with built-in particle systems. Also I can’t see any updates planned on the roadmap or similar, despite finally getting support for things like actually being able to change volume/panning for audio clips in 2019.

To recap, a control track will start the particle system but disable the gameObject at the end, which causes the particle system to completley disappear instead of letting remaining particles die on their own.

Alternatively, if you tell the control track not to disable the gameObject on completion, the particle system is just paused at the end and the particles remain visible indefinitely.

Having to write a bunch of custom code to handle this should not be necessary.

5 Likes

It feels like I’m missing something. I mean, if you’re Unity creating a particle control track the first thing you would do is play and stop, right?

1 Like

I am having the same issue, I start an intro with a particle that should be looping until I disable from another timeline but I can not make the particle to stay on and working. Any update or roadmap for this fix?

Just checking in a year later and I still can’t play particles with timeline effectively. Sub-emitters, looping issues, stopping and clearing, stepping during timescale, etc etc. Is there a plan to work on this or should I invest more time into my own custom track? I would like to use something native if that’s in the works.

As a workaround, I attach an Animator Component to my ParticleSystem and animate the Emission of particles with a recorded animation track. It is quite manual, but it does work and allows for proper Timeline preview.

1 Like

I found another workaround. I working in 2021.2.10f1.

We can create signal track on the timeline. When we add object with particle system on it signal reciever will be created on that object. There we can add reaction ParticleSystem.Stop with Editor/Runtime parameter.
Works for me.

1 Like

The advantage of an animation over this is that the emission will be toggled correctly when jumping through the timeline.
When you have a script that changes the time of timeline or you skip through it in the editor, events will not set the emission correctly.

You will also need a signal asset, but that’s a minor inconvenience and it can be circumvented with custom scripts.

But when you want to keep the particle system playing after a control track (or the entire timeline) ends, you can do it with a signal event.

Still wish unity would add a post-track-behaviour flag to the control clip.

Is there are still no solution for this? I tried to make my own custom track but I can’t find any way to simulate remaining particle after ParticleSystem.Stop() on editor mode