2d night

Hi guys
I am making a 2d game and I faced a little problem. When I was making one of my 3d games and wanted to make the night effect, I had just modified the ambiental color or light, I am not sure how it is named. Anyway, Now I want to do the same thing with a 2d game… but I won’t work. Any ideas ? I would want not to be able to see anything, and then add a light to my player. Ideas ?

make material sprites/diffuse, add this material in sprite renderer. And then just add light.

it doesn’t work man. I have a png with a pixel art player. If I make it diffuse, it makes it a green square. What’s to do ?

do you make it just diffuse or you have created new material sprites/diffuse ? Right click in folder in assets, create → material and set it to sprites/diffuse.

I ve done it man :)). It wouldn’t work :frowning:

try run 2d file in assets

1923563–124216–Assets.rar (16.1 KB)

Thanks a lot for your help. Unfortunately, your scene it doesn’t work neither. I think this is a bug. I will reinstall unity.

i dont think reinstall will help, may be something other is wrong.

here was tutorial with sprites/diffuse
http://imakeinternet.com/unity-2d-sprite-lighting/

1 Like

What about shader?

Thank you all guys for your help. It was a bug. I reinstall unity and now it works just out of the box.