I'm trying to alter the velocity of the existing particles in an emitter by using the following.
ParticleEmitter emitter = shrapnelSS.getEmitter();
foreach(Particle particle in emitter.particles)
{
particle.velocity = Vector3.down * moveAmount;
}
But I'm getting the following error.
Cannot assign to members of `particle' because it is a `foreach iteration variable'
Why can't I edit it? Also is there a better way to do this?