I’d like to change the value of the max particles allowed to be emitted through a script (change value depending on how long you hold down LMB). However, I can’t seem to find a way to access this value through script. Any pointers?
particleEmitter.maxEmission = float value
will work on legacy pre-Shuriken particle system. How can one programmatically alter the “Max Particles” variable exposed via the inspector GUI in the new Shuriken system?
Any property of a Shuriken particle system that can be animated can be changed procedurally, albeit indirectly. Create an animation that modifies the property you’re interested in, then trigger the animation and procedurally set AnimationState.time or normalizedTime.
For example, animate Max Particles between 0 at 0 seconds and 30 at 30 seconds, then set AnimationState.time to the number of particles you want.
Yeah, not ideal, and gets tricky if you want to manipulate multiple properties, but works for some uses.