I have a scene where many spot lights are focused on the screen. All have red color and same intensity. What I want is that the red Color(0,0,0,1) value should increase and decrease in a fading effect over a period of time. I thought of using Color.Lerp() but can not achieve it. What currently I am doing is attaching this script to all the instances of the SpotLight.
void Update()
{
if(Time.time()%120==0)
transform.light.color=new Color(Random.Range(0,255),0,0,1);
}
I know I am missing something big here. Help is appreciated. Thanks in advance.