How to turn on/off particle system?

hi,

I’m making engine. and it’s constantly working. ( on/off every time)

so I use this code,

    public void engineEffect(float up, float forward, float right)
    {
        var emissionUp = upParticle[0].emission;
        var emissionDown = upParticle[1].emission;
        if (up > 0)
        {
            
            emissionUp.enabled = true;
            emissionDown.enabled = false;
            
        }
        if (up < -0)
        {
            emissionUp.enabled = false;
            emissionDown.enabled = true;
            
        }

    }

that up value change it’s value -1 to 1 I need to enable those particles. but it don’t work. it’s enabled the emission. but I can’t see my particles.

Hi @Bhanuka_Dassanayake!

You should refer to your Particle Systems and play them with Unity’s method, ParticleSystem.Play();

You may want to check the documentation of particle systems for more detailed info, but I’m happy to help you out. :slight_smile: