代码如下:
1 ParticleSystem ps = GetComponent<ParticleSystem>(); 2 var main = ps.main; 3 var color = Color.red; 4 main.startColor = new ParticleSystem.MinMaxGradient(color);