Reputation: 53
I set color alpha to 1.0f, i set shader to transparent/diffuse
color = new Color(255/255f, 0/255f, 0/255f, 1f) //unity scales color to 1 AFAIK
go.GetComponent<Renderer>().material.color = color;
go.GetComponent<Renderer>().material.shader = Shader.Find("Legacy Shaders/Transparent/Diffuse");
But i can still see original texture behind the red color. How can i paint it red whole, so i won't see the original texture?
Thanks
Upvotes: 1
Views: 581
Reputation: 159
Can you set the material texture to null? Like this ->
go.GetComponent().materials[1].mainTexture = null;
Upvotes: 4