Particle System doesn't have emitter but is emitting particles

I’m using Unity 3.5, and I never really used the particle system before 3.0 was released. The ‘Particle System’ I’ve added in 3.5 seems to be a complete particle system, as described in the documentation… Animator, Emitter and Renderer in one System attached to my Game Object. I run the game and the particles are emitted as expected, so my lack of experience with Unity’s particle systems is making me second guess whether there is actually a particle emitter with the particle system that is seemingly emitting particles. The frustration comes from trying to loop through the particles in a script attached to the GameObject… the console claims that I do not have a particle emitter, even though my particle system is emitting particles.

I’ve tried :

Particle[] particles = transform.GetComponent<ParticleSystem>().particleEmitter.particles;

And :

Particle[] particles = GetComponent<ParticleSystem>().particles;

And :

Particle[] particles = particlesEmitter.particles;

No matter what I try, the console always says

‘There is no ‘ParticleEmitter’ attached to the “StarsGreen” game object, but a script is trying to access it.’,

Even though my particle system is clearly creating green stars on the screen. When I added the particle system, I went to the Heirarchy pane, clicked on the “Create” dropdown, and added a particle system. I checked Emission and particles are being emitted, I just can’t figure out how to access that emitter via code.

It actually looks like you’re mixing the two different particle engines here. ParticleSystem is the new one (Shuriken). The ParticleEmitter is the old one. They have actually the same purpose. Those components are responsible for emitting and manage particles. I haven’t used the new one yet, so i’m not sure if it has everything in one component, but don’t mix the components up :wink:

From what i can see in the scripting reference the new Shuriken system has the animator integrated since the ParticleSystem has a gravityModifier so i guess it’s animatng the particles itself.

edit

It looks like those should be grouped:

Shuriken:

  • ParticleSystem
  • ParticleSystemRenderer
  • ParticleSystem.Particle

The the old system:

  • ParticleEmitter
  • ParticleAnimator
  • ParticleRenderer
  • Particle