I am using Anima2D to animate my characters. I need to programically lower the Mesh Color value.
Below is what I try but it doesn’t seem to work. I think its because it used the Sprite Mesh Instance Script.
I am trying this:
Renderer rend = thePlayer.GetComponentInChildren();
//Set the main Color of the Material to green
rend.material.shader = Shader.Find("_Color");
rend.material.SetColor("_Color", Color.green);
//Find the Specular shader and change its Color to red
rend.material.shader = Shader.Find("Specular");
rend.material.SetColor("_SpecColor", Color.red);
Thank You for the Help