How to make 2 particle systems behave identical when they are not start from scratch?

There are 2 fire particle systems in scene, they are identical, same properties, same random seed.

When I press Play button, they looks identical.

But this seems only happened when 2 particle systems all start from scratch.

What I really want to do is play first particle system start from scratch, and play second particle system 1 seconds later, and I hope second particle system behave identical to first particle system.

I have tried to set second particle system’s time same to first particle system, but still not work.

I am out of ideas, is this possible?


2 particle systems all start from scratch


First started at 0s, second started at 1s and set time to 1s, they have same time, but still not identical, no idea why

This strikes me as odd - what you are describing seems like it should work. If you are able to report it as a bug, with a link to this forum post and an example project, I will take a look.

Thanks!

Report received! https://issuetracker.unity3d.com/product/unity/issues/guid/UUM-27706

Sorry for long wait, almost forget this.
Anyway, I follow these but still can’t make fire2 to exactly match fire1.
Can you post whole working code?

Project in attachments.
Here’s my code:

using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;

public class Control : MonoBehaviour
{
    public ParticleSystem fire1;
    public ParticleSystem fire2;

    ParticleSystem.MainModule fire1Main;
    ParticleSystem.MainModule fire2Main;

    bool _isFire2Played;
    ParticleSystem.Particle[] m_Particles;

    void Start()
    {
        fire1Main = fire1.main;
        fire2Main = fire2.main;

        m_Particles = new ParticleSystem.Particle[fire1Main.maxParticles];

        fire1.Stop();
        fire2.Stop();

        fire1.Play();
    }

    void Update()
    {
        Debug.LogFormat("<{0}> fire1.time:{1} fire2.time:{2}", Time.frameCount, fire1.time, fire2.time);
        if (Time.time > 1)
        {
            if (!_isFire2Played)
            {
                Debug.LogWarningFormat("<{0}> Paused", Time.frameCount);
                Debug.Break();
                _isFire2Played = true;

                //Copy dafa from fire1 to fire2
                ParticleSystem.PlaybackState playbackState = fire1.GetPlaybackState();
                fire2.SetPlaybackState(playbackState);
                fire1.GetParticles(m_Particles);
                fire2.SetParticles(m_Particles);
                ParticleSystem.Trails trails = fire1.GetTrails();
                fire2.SetTrails(trails);

                fire2.Simulate(fire1.time, true, true);
                fire2.Play();
            }
        }

    }
}

9038839–1248115–FireParticleSystemBug.rar (9.53 KB)

I'm not going to be able to produce an entire working sample for you.

I can tell you though, those "Get" methods effectively retrieve a "keyframe" of the fire1 particle system, which you are then setting to fire2. So after you call the "Set" methods, fire2 should be in exactly the same state as fire1. However, you then call Simulate() with restart=true, which throws away the entire state of fire2 and simulates it again from the start. You should almost certainly just remove the Simulate() line.

9043093--1249087--x2.png
Comment out Simulate line, time not synced, two fire not identical

9043093--1249084--x3.png
Comment out Simulate line and Play line, time synced, but two fire still not identical

9043093--1249081--x4.png
Comment out Simulate line and move Play line to first, time synced, but two fire not identical

I also try change method name from Update to LateUpdate, not work too
What am I missing?

Any helps?