Particle emitter from script.

I have problem with attaching particle emitter to some GameObject from code. There is error with that: “Cannot add component of type ‘ParticleEmitter’ because it’s abstract. Add component of type that is derived from ‘ParticleEmitter’ instead.”
I can’t find these types in documentation. I also got fail when I tried to find ellipsoid type of emitter.
var pEmitter:ParticleEmitter=pParticle.AddComponent(ParticleEmitter); It’s failed string.
Help me, please.

Instead of creating a new particle emitter using code, create particle emitter and attach to the gameobject in scene and then control it using particleEmitter.enabled boolean variable.
See more on particles scripting here
http://unity3d.com/support/documentation/ScriptReference/ParticleEmitter.html

No. I can’t. I gonna create a lots of game objects with a lots of particle emitters. It’s world generator.

so then make a prefab of gameobject with particle emitter attached…

Ok, that’s better:) Thanks for idea. I just never used prefabs and never thought about it…