Performance: Particle System component
HIGH IMPACT
This affects the rendering performance and frame rate by controlling how many particles are drawn and updated each frame.
var ps = GetComponent<ParticleSystem>();
var main = ps.main;
main.maxParticles = 500;
ps.Play();var ps = GetComponent<ParticleSystem>();
var main = ps.main;
main.maxParticles = 10000;
ps.Play();| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| High maxParticles (10000) | N/A | N/A | High GPU load, many draw calls | [X] Bad |
| Moderate maxParticles (500) | N/A | N/A | Lower GPU load, fewer draw calls | [OK] Good |