Hi,
I am having problems trying to fix this script…
I want to control the time of transition between the colors. But I don’t know why is not working the fading. Now I can change the Color without problems,
Please any advice is more than welcome.
var startColor : Color;
var myColors : Color[];
var NextColor : int = 0;
var fadeSpeed : float = 3.5;
function NextMaterialUsed()
{
GetComponent.<Renderer>().material.color = Color.Lerp(startColor,myColors[NextColor],Time.deltaTime * fadeSpeed);
if(NextColor < myColors.length-1)
NextColor += 1;
else
NextColor = 0;
}