Hello;
I have created a shader script here’s a part of it
Properties
{
_SunColor("Sun Color of Light", Color) = (0.977612,0.9254484,0.882769,1)
}
I’d like that the script would be like that :
//
var colorObject : GameObject;
var theColor : Color;
function Start () {
theColor = colorObject.light.color;
}
function Update () {
this.renderer.material.Sun_Color_of_Light = theColor;
}
//End of script
- The “colorObject” variable is a GameObject with Light (like direction light)
My question is how can I make the color that I’ve mentioned in my shader script being able to be changed with the variable “theColor”
Sorry if I wasn’t very clear with my question
Thanks, your help would be great ![]()
Does the code you have not work?
– Graham-Dunnett