Unity particle system not working

I have a prefab with a particle system attached. In the code I play the particle by using this code

            ps.enableEmission = true;


When i run the game, and that code executes, the particle emitter does not emit anything in the "game" window unless i press simulate button in the "scene" window.

Anybody knows why?

– MAnd
Feb 24 '16 at 3:01
• What simulate button is in the scene window? I think the Unreal Engine has a simulate button... Feb 24 '16 at 3:13

For the emission property to work the particle system has to actually be playing. To do this you can either enable Play On Awake in the ParticleSystem component or you use the Play method on an instance of the component.

As a side note, if you are using 5.3+ the enableEmission property is now obsolete and you may want to consider using the emission property. One thing to keep in mind when using this property is you have to assign it to a variable before attempting to modify it:

public ParticleSystem _ps;
...
private void Update()
{
ParticleSystem.EmissionModule module = _ps.emission;
module.enabled = true;
}


Yea, it is difficult to handle it like this.

Just mark it as Play On Awake, set any duration (no unlimited life), make prefab and instantiate it instead of Play or Enable

set the particle system as Play on Awake, and disable the particle system. set it active when you want to start and de-active when you want to stop.