I am trying to get 2D lighting but it won’t work! I followed tutorials on youtube and have no idea whether to use Lightweight RP or Universal RP.
Why is this a bug? Forums are for specific questions, nobody here can fix “it won’t work” TBH.
If you want help then please put some effort into describing what you’ve done and what part doesn’t work for you. If you simply don’t understand it then maybe ask a question about it. If you want alternate tutorials then post the ones you’ve followed.
It sounds like you want someone to write a tutorial you can follow or something.
I have done everything up to changing the shaders Unity just won’t let me change the materials and when I try to do it manually I can’t find the material
Do I have to download the materials?
Make sure you search for recent tutorials. Lightweight RP is the old name for Universal RP, so avoid those tutorials. 2D lighting has changed a lot so it’s no wonder you’ve found those instructions confusing!
Specifying the current year or Filtering your search should help: https://www.youtube.com/results?search_query=2022+2d+lights+unity
Be sure to use a recent version of Unity too.
This Brackeys tutorial is specifically about Shaders, however the process he uses covers the initial set up for shaders and lighting in 2D.
Once you’ve got the Universal Render Pipeline Asset, attached the 2D renderer and then gone to Edit > project settings and assigned your Pipeline in the ‘Scriptable Render Pipeline Settings’,
watch the video below at the 4 min mark. In this, he explains how to change all your sprites materials, so they are using the lit material - you don’t have to download anything, Unity has an inbuilt upgrade system that will upgrade all your gameobjects to use the new material.
One extra thing that might help (if your 2D game works this way), if you’re wanting to use lighting but you also want to control the camera settings (which becomes hidden when you use a pipeline) for example you have a set up in 2D game where you make objects that are closer on the Y axis show in front of other objects, you can control this instead in your 2D renderer, so change the Transparency Sort Mode to ‘Custom Axis’ then Transparency Sort Axis Y value to 1 - this took me a bit to find, didn’t want you to have same frustration if your 2D game works this way ![]()
Let us know how you get on.
Thanks I got it figured out