Making a gameobject solid white (like shmup damage)

My game is 2.5D so my characters are planes with pre-rendered graphics. Is there a way to make my current frame solid white while retaining the alpha? This is a popular technique in shmups where, when you hit an enemy, they turn white momentarily but retain the alpha. I don’t want to have to load an entire set of images that are solid white, so I’m wondering if there’s a way to do it via scripting.

Sure, swap the renderer’s sharedMaterial for another for the duration of the flash, then restore the original sharedMaterial.

1 Like

But what kind of material would create this effect?

A white material.

1 Like

other options
set material color with script, like tint, if your shader has it.
if thats not bright enough, customize shader to make it whiter * 2, or to have it lerp between current color and white by adjusting lerp from 0 to 1 in script…