I have a 2d game made of sprites (made of PNG files). I have no light sources, just the natural color of the sprite image files.
I would like to make everything darker evenly as the sun goes down but I don’t see how I can do that. I also want to add light sources light torches that light up a small area.
Right now, I can’t get any light sources to do anything in my 2d sprite world.
For future readers - I solved this and it’s pretty simple.
Any sprite you load into Unity has RGB values of 1,1,1, which technically is white. But for a png sprite for example, 1,1,1 translates to displaying the sprite the way it was imported.
So to change that, you simply need to adjust the RBG values EQUALLY between 0 and 1 - not the normal 0 to 255 that we have in other programs.
To make a sprite black, set RGB to 0f,0f,0f.
To make a sprite slightly shadded, Set RGB to 0.8f,0.8f,0.8f
To make a sprite almost black, set RGB to 0.2f,0.2f,0.2f
You get the idea. When you do it this way, the multi-colored sprite will evenly change to darker shades. All numbers between 0 and 1 will work but they have to be equal across all three RGB values, otherwise you will change the hue.