Legacy Documentation: Version 5.0
Language: English
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

ParticleEmitter.emit

Switch to Manual
public var emit: bool;

Description

Should particles be automatically emitted each frame?

function Start() {
	var emitter = GetComponent.<ParticleEmitter>();
	
	// Emit particles for 3 seconds...
	emitter.emit = true;
	yield WaitForSeconds(3);
	
	// ...then stop.
	emitter.emit = false;
}