Particle system bug ?


I have the following function which is called in update function at a certain event (if...).

h is an object that has a particle emiter.

function hintAnim(obiect){
    h.particleEmitter.emit = true;
    h.transform.position.x = obiect.transform.position.x;
    h.transform.position.y = obiect.transform.position.y;
    yield WaitForSeconds (3);
    h.particleEmitter.emit = false;

The problem is that after the 3 seconds delay, the particle system still emits particles, but few and rarely. After calling the function again from update, the particle system emits the same number of particles as after the delay (few and rarely). Is this a bug ? Or it is a problem by calling from Update function ? Practically true/false emit doesn't work as it should.


I call the function hintAnim from Update function. That might be the problem ?