Search Unity

Particles emit problem (bug?)

Discussion in 'Scripting' started by Genie, Mar 7, 2010.

  1. Genie

    Genie

    Joined:
    Sep 12, 2009
    Posts:
    23
    I have an object named AvioObject and two particle elements (tagged PSmoke and PSBurning) as children of that object. I can normally grab them and manipulate with them but when I shut down one the other shuts downs also!

    So I do something like this

    first I get one particle emitter and start it (and also in the game I can see it started for a second..)

    var burningParticlesObj = gameObject.FindWithTag("PSBurning");
    var pBEmitter = burningParticlesObj.GetComponent(ParticleEmitter);
    pBEmitter.emit = true;

    and then I close the other

    var smokeParticlesObj = GameObject.FindWithTag("PSSmoke");
    var pEmitter = smokeParticlesObj.GetComponent(ParticleEmitter);
    pEmitter.emit = false;

    but it shuts down the previous one too! Am I missing something here? Thank you.
     
  2. andeeeee

    andeeeee

    Joined:
    Jul 19, 2005
    Posts:
    8,768
    I think you're right about this - please can you report it as a bug? As a workaround, have you tried disabling the object to which the emitter is attached as a way to turn it off?