I am simply not able to turn particle effects on/off with c# code … for some awkward reason. I test it by simply having a particle component on object called Particles1 and have it Play On Awake. Then I tested the few different versions I’ve found in threads where people where asking the same questsions
Which I simply don’t get, the particle emitter is on that object … and so is the script. Clicking on the emission checkbox (while it is playing) works however and turns the emission off.
Try ParticleSystem instead of ParticleEmitter, and replace “emit” with “enableEmission”.
… do mind, of course, that that will leave the particles that were previously emitted still hanging out until they die. If you need a hard “turn entire system off / hide it all instantly” toggle, you can change the Layer of the parent game object to one that isn’t rendered by your camera.
One thing to note is that if your using the new shuriken particle system than even tho you can prevent rendering, you can’t actually “turn off” anything. In fact they are still burning cpu regardless of object states.