|
I wonna change the color of the material at the runtime (particle system)!
Why doesnt it work? What am i doing wrong? Celofa
(comments are locked)
|
|
The color of a particle can be modyfied by Particle.color. var partColor : Color; function Update () { partColor.particle.color = Color.red; } like that?? sry iam really new to Unity?
Jan 18 '11 at 09:54 AM
Celofa
(comments are locked)
|
|
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); }
(comments are locked)
|
|
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.
(comments are locked)
|
|
YourParticleTransform.GetComponent().material.SetColor("_TintColor", DesiredColour); Works if you are using Particle Materials
(comments are locked)
|
|
You could also try this: http://answers.unity3d.com/search.html?redirect=search%2Fsearch&q=change+color+on+particles
(comments are locked)
|

(not edited, only added tag 'particles')