Hello everyone I know this question was asked a multiple times, but non of the solutions from other question gived me a result I want.
Here is the code example that I tried first, it changes the value of RGBA but it’s not returning them to material, basically I don’t understand how to return “Color” to material.
Color col = GetComponent<MeshRenderer>().material.color;
col.a = 0.4f;
Debug.Log(col.ToString());
And a second example just gives me a material error.
Renderer rend = GetComponent<Renderer>()
rend.material.SetColor("_SpecColor", new Color(1, 1, 1, 0.5f));
Anyone can you please give some advice.