Making Object Flash?

So I’ve been lurking here for a while and I’ve read a few posts today about a problem I’d like to solve however I need to make sure I’m right. In other questions here people wanted to make on object flash a certain colour. In my case I want an object to flash white when certain conditions are met. Most other answers suggest setting two colour variables then using renderer.material.colour to swap between the two. That is fine if the object is one colour but how does this effect an object that already has a material? For example I have a spaceship, given a certain trigger I want it to flash white. Could I set two colour variables. Assign one to white and one to nothing and cycle through them or will that break the material I currently have assigned to the object.

I can’t test this as Im stuck away from my PC for a while but would like to try and trouble shoot my problem. Also sorry for any errors I’m on my phone :frowning:

So if you are using a normal diffuse material flashing the object white by changing the colour will not work. White means render the texture with the same colour as it originally has, another colour will tint the object’s existing texture to that colour. (so black would work). You should probably make a white material and switch it with the original or have a shader that will totally overwrite the texture colour if you set a colour and the texture isn’t transparent.