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
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.