Cycle through colors?

Hello. How would I make a material cycle through colors? Thanks

Well, if its possible. You could just set the material.color value. E.g.:

// You can then set the colours in the inspector
public Color[] colors = new Color[0];
// Current shown colour
public int currentIndex = 0;
// Seconds between change of colour
public int changeColourTime = 1;
// Last time we changed a colour
private float lastChange = 0.0f;

void FixedUpdate()
{
    if (colors.Length > 0 && lastChange + changeColourTime < Time.time)
    {
        lastChange = Time.time;
        currentIndex = (currentIndex + 1) % colors.Length;

        renderer.material.color = colors[currentIndex];
    }
}

I think that might work :) Haven't checked for errors.