How to control scale of individual particles with Emit()

I have a particle system, it’s shared by lots of game objects. Some of them want to create big explosions, others want to create small explosions, and a whole range in between. I’m using ParticleSystem.Emit() to emit the explosions at different locations, it’s nice because its very performant compared to using multiple different Particle Systems to do the same effect.

I need to control the size of the explosions however, and modifying the size using the scale of the PS Game Object isn’t working because it scales all of the active particles at once. How can I control the size of individual explosions effectively? I’m ideally looking for a solution that uses EmitParams.

You could try this:

  • In the Shape module, there is a Transform Scale property. Set that to your scale value. This will scale up the locations of the particles, but not their individual sizes
  • Next, in the main module settings, scale the start size by the same multiplier (baseStartSize * scaleFactor)
  • Ensure applyShapeToPosition is set to true in your EmitParams
  • Then call Emit with the emit params

You could also set startSize in the EmitParams instead of the main module, but doing it in the main module will allow you to retain any randomness settings, vs. giving a fixed size to all particles.

Remember that changes to the Shape module and Main module will be remembered for future emit events, so be sure to set them before every emit.