ParticleEmitter

Is it possible to add ParticleEmitter as a component via a script or must we use one of MeshEmitter or ElipsoidEmitter? I’d like to create my own emitter script but AddComponent(“ParticleEmitter”) doesn’t seem to do anything.

Jeff

AddComponent(“ParticleEmitter”) does add the emitter; you also need to add an animator and renderer to use them, though. Given the amount of tweaking that needs to be done in particle systems, it’s generally a better idea to use a prefab than to try to create it in script.

It kept throwing an error for me that said it couldn’t load an abstract class. This makes sense if in fact PE is an abstract class, though if it works for you I’m not sure what is going on. In any case I used a EllipsoidEmitter and turned off it’s emit property and everything worked out fine.

Jeff

So how do I go about extending the ParticleEmitter class? Can I do this in JS or do I have to use C# and do “Class SomeEmitter Implements ParticleEmitter”?

Jeff