Whats the best way to create a 'legacy' particle system?

I am currently working through the book “Unity 3.x Game Development Essentials”. In chapter 8 they introduce particle systems. The description of how to configure the particles systems wasn’t matching what I was seeing in Unity 3.5.6f4. After some Googling I realized that they are referring to the ‘legacy particles system’, not the Shuriken system.

I managed to create a legacy particle system by creating a particle system from the Hierarchy then applying an emitter, renderer and animator to it from the Component->Effects->Legacy Particles menu and removing the ‘Particle System’. Using this method I had to re-apply a material in the renderer for it to work. As outlined in another question.

Is there a simpler way to create a legacy particle system? They way I did it seems a little clunky…

Thanks!

This will make it really easy. FIRST, in your ASSETS folder, create a new folder and name it Editor. In the new Editor folder, create a C-Sharp Script and name it MyWindow. Now just copy and paste the following code to that script. This will create a new menu in Unity called “Custom”, when you go to it select “Add > Particles > Ellipsoid Particle Emitter”. Done. You still have to add a material but this makes it WAY less of a pain to use legacy particles. This just creates a new empty game object and adds all necessary components. Let me know if you have any issues. Notice the class name in the script is MyWindow. Make sure to name the script MyWindow for this reason.

///////////////////////////////////////////////////////////////////////////////////

using UnityEditor;
using UnityEngine;

class MyWindow : EditorWindow
{
	[MenuItem("Custom/Add/Particles/Ellipsoid Particle Emitter")]
	static void AddEllipsoidParticleEmitter()
	{
		GameObject epe = new GameObject("Ellipsoid Particle Emitter");
		epe.AddComponent("EllipsoidParticleEmitter");
		epe.AddComponent<ParticleAnimator>();
		epe.AddComponent<ParticleRenderer>();
	}
}