Hi there,
I have a spriteRenderer whose alpha color I am altering, to gain a transparency in game. However, despite storing the spriteRenderer’s color and successfully altering the .a value, it is having no impact on the sprite itself. Any ideas?
IEnumerator runWhiteFlash(){
bool running = true;
whiteFlash.enabled = true;
Color clr = whiteFlash.color;
clr = new Color(255, 255, 255, 255);
whiteFlash.color =clr;
while(running){
clr.a = clr.a - 1;
print ("clr.a " + clr.a);
whiteFlash.color = clr;
if(clr.a <= 0){
running = false;
whiteFlash.enabled = false;
}
yield return null;
}
}