void Start() { color = color.SetRandomGrayColor(alpha); ps = GetComponent <ParticleSystem>(); particles = new ParticleSystem.Particle[ps.main.maxParticles]; int partCount = ps.GetParticles(particles); setParticleColors(partCount); setParticleSizes(partCount); var trails = ps.trails; trails.enabled = true; var psr = GetComponent <ParticleSystemRenderer>(); psr.trailMaterial = new Material(Shader.Find("Sprites/Default")); }