How do I make a cube fade to a colour?

I want to do something seemingly very simple: I have a cube and I wanted it just a plain colour. Instead of importing any texture/sprite I just decided to make a material with a shader of Mobile/Unlit (any better one to choose if I want it to just be lit all the time and ignore the lighting?) and then set the colour to white. I applied this to material element 0 of my cube’s mesh renderer.

Then I wrote a script and attached it to the cube. There is a public var that holds a Color type and I put this in the Update() method:

renderer.material.color = this.colourToChangeTo

Nothing happens however. My end-goal is to fade from one colour to another, but first I need to be able to actually set the colours.

Take a look at this tutorial:

This should give you what you need to do what you want (it’s towards the end of the video). I recently found that you can LERP between materials as well.