Search Unity

Scripting a Mesh Particle Emitter?

Discussion in 'Scripting' started by chrischris, Dec 3, 2007.

  1. chrischris

    chrischris

    Joined:
    Oct 18, 2005
    Posts:
    19
    I would like to set the mesh in a Mesh Particle Emitter via a script, but I can't access the ParticleEmitter component as a Mesh Particle Emitter because it appears it is not an actual component type known by the scripting engine. ( The same is true of the Ellipsoid Particle Emitter. )

    Am I missing something, or is there a way around this?

    Thanks!
     
  2. nickavv

    nickavv

    Joined:
    Aug 2, 2006
    Posts:
    1,801
    I think that plain old "ParticleEmitter" is used to refer to both.
     
  3. Daniel_Brauer

    Daniel_Brauer

    Unity Technologies

    Joined:
    Aug 11, 2006
    Posts:
    3,355
    More importantly, only ParticleEmitter (the superclass) is exposed to scripting. Any variables specific to its subclasses are only editable in the Inspector.