Answer the question
In order to leave comments, you need to log in
How to enable Particle System -- Emission?
Good afternoon!
Look, I have a fire extinguisher, it has a Particle System as a "foam", well, such white particles are like foam, but not the essence, see initially it should be disabled, that is, I just turned off Emission in the properties, then I want to create a script click to turn on the foam.
public class fire_ex : MonoBehaviour {
public ParticleSystem.EmissionModule emission;
public GameObject isObject, pl;
public string objName;
public GameObject Sm;
public ParticleSystem Smoke;
// Use this for initialization
void Start () {
Smoke = GetComponent<ParticleSystem>();
}
// Update is called once per frame
void Update () {
}
void OnMouseDrag() {
isObject = GameObject.Find("fire");
var emission = Smoke.emission;
emission.enabled = true;
}
}
Answer the question
In order to leave comments, you need to log in
You need to turn off not the module, but the particle system itself. The module must be disabled if you are going to manually spawn particles using ParticleSystem.Emit . In your case, it's better to pull Play , Pause and Stop at the right time.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question