[Help] Unity 2021 How to sync mesh animation and particle effects?

Hi all! I’m new to the forum. Is there a way in unity 2021 to add particle systems to mesh animation and preview both in editor to adjust things on the go? I’m locked using srp only.

The problem is that I need to add particles to mesh animation of a lootbox opening.

Hi Cyfers,

I’ve faced this exact problem before and I don’t think there’s a way to do what you’re asking. My workflow was to create a simple test scene with the lootbox anim and pfx in, and then run the scene every time you want to test. Make a simple script in that allows you to reset the animation with a keyboard shortcut ( or a UI button ) so you can see it multiple times without having to restart the scene. Or for a quick and dirty method, disabling and enabling the parent object of the lootbox object while the scene is running should restart the animations.

1 Like

Hi there,
if I understood you correctly, you should be able to do it with a timeline! (As long as you are not using VFX Graph, timeline scrubbing isn’t supported yet afaik).

If you add the animation and the particle effect to the timeline, you can preview both at the same time. Shuriken supports timeline scrubbing so you can adjust things and move forward/backward like when editing a video and both the animation and particle effect will update.

That works in editor, tested in HDRP, not sure if its different in URP tho

1 Like

Ah, interesting! Hadn’t thought of using timeline, will give it a go next time I need to do this! :+1:

Wow! Thank you all for replying. I’ll try these solutions as soon as I can get back to work!

Hello,
If you want to try it with VFX Graph we have a few things that might help. (you can get it from package manager on SRPs

In this article you can find a bit of informations about skinned mesh sampling in VFX Graph that might help you to created effects on animated mesh: New possibilities with VFX Graph in 2020 LTS and beyond | Unity Blog (scroll a bit until chapter on skinned mesh)
If you don’t need to bind directly your particles to the animated mesh informations (vertex positions for example) you won’t need this.
We also improved the use of timeline with VFX Graph in unity 22.2 (scrubbing, events management) , here is a video I made to show this new workflow: VFX Graph Timeline scrubbing and events authoring | Unity - YouTube

Hope this helps !