Question by
russellprice90 · Apr 16, 2017 at 04:29 PM ·
materialcolor changematerial colormaterial renderer
Transparent texture color?
I am trying to change the color of a circle when a object is selected. its hidden when its not selected and only white(default color) when i click the object. I have the player as green.
the circle is a texture, i have alpha is transparency so you can see the circle. the material is currently using unlit/transparent cutout. i have a quad under the object with the material on it.
the parent has a script that accepts a mesh renderer
code is below:
public MeshRenderer[] renderers;
// Use this for initialization
void Start () {
var color = GetComponent<Player>().info.accentColor;
foreach ( var r in renderers)
{
r.material.color = color;
}
the color does not change at all to the green i have the accent color set to.
Thank you in advance.
Comment