Particle System start/stop WTF.

if (engc_main > 0) {
enginesParticles[0].enableEmission = true; //works but obsolete, new version is enableEmission

enginesParticles[0].emission.enable = true; //error: Cannot modify the return value of ‘ParticleSystem.emission’ because it is not a variable

enginesParticles[0].Play(); //only plays when engc_main <=0

I can get the result I want, without unity telling me the code is obsolete, but I’m coding for the opposite of what I want… or am I going crazy?

engc_main is the forward thrust input axis, when it is >0 the ship moves forward and main thrusters’ particles should activate, thus: if engc_main >0 then …right?

I feel like using enableEmission even though it’s obsolete because at least my head isn’t hitting the keyboard.
Also, why is the editor telling me to use a new version enableEmission that can’t do the same thing, while the old version is still working as expected?

Please read the official blog about particle system scripting changes (Particle System Modules - FAQ | Unity Blog). One particular issue with the change is that the variable of the ps module must be declared separately from the “ParticleSystem” var (e.g. ParticleSystem.EmissionModule emissionModule;) because module is a “struct” type, not “ParticleSystem” type.