- Home /
How do you change the colour of individual particles having assigned them a material?
I have a particle system, and I have no problem changing individual particle colours in the default material and shader, just simply using
particles[i].color = myColor[i];
However, when I assign the particle system a new material that I made (using an unlit shader), I cannot assign the colour using this method. I also can't seem to use
particles[i].GetComponent<Renderer>().material.color = myColour[i];
What I ultimately want to do is have solid-colour particles with no diffuse alpha gradient (as is there in the default material). How can I change the colour of the individual particles, while having non-diffuse looking particles?
Answer by benjaminoutram · Nov 10, 2015 at 05:13 AM
I figured out the answer to my own question - it is simple really. After choosing a material in the "renderer" section of the particle system options, you should select a shader from the "particles" section in the shader select drop down menu next to the material component. To replicate the default shader, you should select "particles/alpha blended premultiply" from the shader menu. You can select a new texture that has a solid texture to create opaque particles.