I'm using Unity 5.3x for a game. I've a Prefab with the following structure hirerchy of object
MyPrefab -> MyContainer -> NitroEffect -> NitroFlamethrowerFire
I'm having problem on how to Play Stop Particle System. I'm using the following code, but (don't laugh) sometimes works, sometimes not, and i don't know why.
Container = transform.Find ("MyContainer").gameObject;
PS_Nitro = Container .transform.FindChild("NitroEffect/NitroFlamethrowerFire").GetComponent(); PS_Nitro.enableEmission = false; //to stop emission
And
PS_Nitro.enableEmission = true; // to start emission
So my question is: how to start stop properly a Particle emission ?