Where did Start color on particle system go?

I want to change the color of particle base on the brick that is destroyed here is the code

GameObject smokepuff = Instantiate(smoke, gameObject.transform.position, Quaternion.identity) as GameObject;

smokepuff.particleSystem. // this is where the StartColor is missing.

In Unity5 How can I set the particle system color?

Never mind I got it working

smokepuff.GetComponent().startColor = gameObject.GetComponent().color;

1 Like