Celofa
1
I wonna change the color of the material at the runtime (particle system)!
var partColor : GameObject;
function Update(){
if (Input.GetButton ("Jump")) {
partColor.renderer.material.color = Color.red;
}
}
Why doesnt it work? What am i doing wrong?
Celofa
efge
2
The color of a particle can be modyfied by Particle.color.
Noah-1
3
Hello, well try this piece of code:
function Start () {
// Set glossy shader so that specular color is used
renderer.material.shader = Shader.Find (" Glossy");
// Set red specular highlights
renderer.material.SetColor ("_SpecColor", Color.red);
}
MaterialPropertyBlock might be what you're looking for:
http://unity3d.com/support/documentation/ScriptReference/MaterialPropertyBlock.html
With it, meshes using the same material can be different colors.
system
5
YourParticleTransform.GetComponent().material.SetColor(“_TintColor”, DesiredColour);
Works if you are using Particle Materials
DaveA
6