Control a shader component with script.

Hello I’m trying to change the color of the following component in a shader.

_Tint ("Offset", Color) = (0,0,0,0)

If I wanted to change the diffuse color, I would simply write this:

renderer.material.color = CustomColor;

What do I write if I wanted to change the color of “Offset”?

I assume I would use Material.shaderKeywords as it states in the script reference. But I can’t get it to work. The reference isn’t exactly a manual, nor does it refer me to an example of usage.

Sorry for being a moron. I’m fairly sure I know what I want to do, but I can’t write it out right.

you change the _Tint into _Color, or you use material.SetProperty commands (SetColor, SetVector…etc)

Thanks for your help. But I have another problem. I’m trying to change the material of a projector but an error message informs me that the projector doesn’t have a rendering component, which it doesn’t. How can I change material properties without a rendering component.

SOLVED!!
You need to write it like so:

GetComponent().material.SetColor (“_Tint”, CustomColor);