Fade In Transition


This is the line I used to complete the challenge:

FadePanal.color=new Vector4(0,0,0,1-Time.timeSinceLevelLoad / FadeinTime);

Are there any disadvantages to creating a vector 4 each update? This way just seems a lot of intuitive to me and it’s a lot smaller and cleaner to have in the code. I spent WAY too long multiplying it by 255 and wondering why it wasn’t working(the color floats are 0-1 and represented as 255 in the editor itself) to want to just remove it without a good reason ha.

Privacy & Terms