HOW TO SET UP 2D LIGHT IN UNITY 🎮 | Unity URP 2D Lighting Tutorial | Learn Unity For Free

In this video I will show you how to create 2D light in Unity, using the new URP Unity has made specifically to create light in 2D games. 🙂
➤ TIMESTAMPS
00:00:00 - Introduction
00:00:20 - Create a 2D URP project
00:00:58 - How to upgrade 2D projects to URP
00:03:54 - Create a global 2D light
00:05:04 - Showing you my game
00:05:22 - How to toggle light in Scene View
00:06:07 - How to create 2D lights!
➤ GET ACCESS TO MY LESSON MATERIAL HERE!
First of all, thank you for all the support you have given me!
I am really glad to have such an awesome community on my channel. It motivates me to continue creating and uploading content! So thank you!
I am now using Patreon and KZread Memberships to share improved and updated lesson material, and for a small fee you can access all the material either from my memberships or Patreon, depending on your preference. I have worked hard, and done my best to help you understand what I teach.
I hope you will find it helpful :)
Memberships: / @dani_krossing
Patreon: / mmtuts

Пікірлер: 46

  • @mikaeltorres
    @mikaeltorres Жыл бұрын

    I am commenting again jsut in case someones runs into the same issue as me. I followed this to transform my current project that has multiple scenes and many thigns already created from a simple 2D to an 2D URP project. The "Update" option in Edit->Rendering, never appeared no matter what I tried causing the lights not to work or have any effect on the sprites. To solve this I created a new material that uses the default URP lit material and applied that manually to my prefabs. It is a manual workaround but it did the trick for me so I thought would be good to post this in case someone else has the same issue as me. Other than that, great tutorial and so so helpful! thanks again Daniel

  • @Dani_Krossing

    @Dani_Krossing

    Жыл бұрын

    I’ll pin this to help others find it. 🙂

  • @applegi2652

    @applegi2652

    Жыл бұрын

    You can simply go to Window > Rendering > Render PipeLine Converter > Tick Material and Material Reference Upgrader > Initialize Converters > Convert Assets

  • @BeingBelligerent

    @BeingBelligerent

    Жыл бұрын

    Thanks for this comment. Was actually super helpful for me.

  • @Paid2Live17

    @Paid2Live17

    Жыл бұрын

    @@applegi2652 This^^^^^

  • @owencoopersfx

    @owencoopersfx

    11 ай бұрын

    Legendary pinned comment. Thanks! :)

  • @-hackers_industry
    @-hackers_industry Жыл бұрын

    Dude gives us so much to learn for absolutely free. DESERVES SO MUCH MORE ATTENSION !

  • @joscpe
    @joscpe Жыл бұрын

    It's great that you take the time to explain certain details, such as converting to URP. I'm certain the extra effort goes a long way for those who do not have the experience with these features and packages!

  • @Janiqz
    @Janiqz Жыл бұрын

    I just want to say that I LOVE YOU. Completely unrelated to this video but thanks to you, I've really progressed in website development so thank you for your brilliant tutorials!

  • @junglejim6674
    @junglejim6674 Жыл бұрын

    You are the man, I watched too many videos before I found this gem. Thanks so much! I'm making a grey scale fighting game, the moonlight I made casting down onto the street looks soooo good. About to do some lamps woot!

  • @mikaeltorres
    @mikaeltorres Жыл бұрын

    I was just starting to think and work on lighting in Unity, this came out at the perfect moment!! thanks!

  • @kibo7430
    @kibo7430 Жыл бұрын

    Great tutorial dude! took a bit to find one that taught how to use rather than just stopping at the conversion ahaha. Very much appreciated

  • @robertconstantin3076
    @robertconstantin3076 Жыл бұрын

    I pressed the like button before watching the video. You're awsome man, i don't need to watch the video to know that it is very well structured and with good explanantions.

  • @immen_
    @immen_ Жыл бұрын

    Unbelievable good tutorials. Thank u Dani, for this one.

  • @svenmehlhorn2173
    @svenmehlhorn2173 Жыл бұрын

    great tutorial, thanks a lot!

  • @MrGoodMorning183
    @MrGoodMorning18311 ай бұрын

    100% Simple 100% Direct 100% Useful

  • @TundeEszlari
    @TundeEszlari Жыл бұрын

    You are a very good videographer.👌🏻❤

  • @random_precision_software
    @random_precision_software Жыл бұрын

    Thanks Man good vid. Can you tell me what the other URP assets do ? (1m.59s) there are another 3 below the one you picked ?

  • @MoritzFH5
    @MoritzFH5 Жыл бұрын

    hey, will you put out another part on the login system related to the profile page? And by the way that was a great tutorial :D

  • @favour5442
    @favour5442 Жыл бұрын

    Second to comment ✌️✌️

  • @youngsijupresentsnext-geng1603
    @youngsijupresentsnext-geng1603 Жыл бұрын

    Hey your video is amazing...I was wondering if you can help me out...I am try to use shader graph 2D but when i add my texture which had come with my water sprite from photoshop...the texture is not covering the full screen which is making the shaders to come out wrong...is there a way of resizing the texture...

  • @filisen
    @filisen5 ай бұрын

  • @Peace_15
    @Peace_15 Жыл бұрын

    hi Dani, sorry i kinder off the topic a little bit but i was looking at your channels recently and i found out that you kinder switched to various things other than focus more as a web developer. I don't know your reasons behind your decision but i feel like you such a good tutor on those topic that you can finish off some course that your were doing which i feel like you didn't finish like the bootstrap and other like the aJax and bootstrap. I really like your teaching technique you teach from the basics which is good and i also i think the older videos of yours has more views than the current ones because your audience are more of students than of entertainment. I wish you good like and hope you can clarify on that one.

  • @Dani_Krossing

    @Dani_Krossing

    Жыл бұрын

    The reason I am focusing more on game development atm, is because I find it exciting and fun. 🙂 Web development was something I did 7 years ago, and like everything else in life, passions change over time. Nowadays my only reason to continue doing web dev, is so I can teach it on to others. I don’t actually use web dev in ANY way, in my daily life, and it doesn’t excite me anymore. I’m glad you think my way of teaching is good. 🙂 But that isn’t enough reason to continue doing something you don’t enjoy. I will still upload web dev, but at a less frequent rate. 🙂 I’m working on a “HTML mega video atm”, but it won’t be ready until I feel motivated to finish it.

  • @user-ek4lu4wn3n
    @user-ek4lu4wn3n Жыл бұрын

    Hey! When trying to use 2D Shadows with cinemachine in unity 2021 they seem to move in the wrong direction than what the camera is moving to. Do you know if there's a way to fix this? Upgrading to unity 2022 is one of the solutions but because of technical issues we'd lose a lot of time reworking some of our techs :(

  • @konradmostert1153
    @konradmostert1153 Жыл бұрын

    in 8:09 you change the layer sorting which is what I am looking for, however I am using a canvas and somehow the sorting layers seem to have no real effect: If i put the target layer of the light to a new layer and select this layer for the sprite than i can see no light. i apparently only can see the light if default is selected as target layer which illuminates everything. any ideas?

  • @phorcy1877
    @phorcy1877 Жыл бұрын

    Hi I know the tutorial is a few months old but do you know why a Global Light would work in scene view but not in game view

  • @htmoh8115
    @htmoh8115 Жыл бұрын

    hi i am a total beginner. i have a question on php. Im trying to add a live chat using an external file,. how do i add to my html page and deploy? i'm stuck. thx in advance.

  • @sunatoji651
    @sunatoji651 Жыл бұрын

    Dear sir, In oop php register and login project when using $result in functions error is coming that it is undefined variable.Can you clarify that

  • @fatpenguin_
    @fatpenguin_11 ай бұрын

    My heart dropped when I heard that You can't convert it back, I ran into some issues while making my game, and I was going to watch another video (which is this one) and just reverse the steps. Any ideas what can I possibly do to revert the changes? Or just disable the lighting?

  • @joimikasa
    @joimikasa6 ай бұрын

    for some reason the 2d lights options are greyed out for me? does anyone know why and how to fix this?

  • @relganz4663
    @relganz4663 Жыл бұрын

    When I create a new object -> Rendering, there is nothing that shows up in Rendering except "URP Decal Project". Does anyone know how to fix this?

  • @என்_உலகம்
    @என்_உலகம்11 ай бұрын

    Use this to upgrade asset Window -> Rendering -> Rendering Pipeline Converter.

  • @tenebrusnoirceur6343
    @tenebrusnoirceur63435 ай бұрын

    I've followed everything, but Lights don't work :c

  • @MrCreepsGaming43
    @MrCreepsGaming4310 ай бұрын

    Hi, I really hope you are still responding to comments, The global light doesn't seem to be working for me, I set the intensity to be 0 and there was no change in the lighting of the scene. I increased it and no change. It acts as if there is no lighting at all. Could you help :)

  • @MrCreepsGaming43

    @MrCreepsGaming43

    10 ай бұрын

    Nevermind, I was able to fix it myself. I didn't have the materials set for my player object and my tilesheets to be Sprite Lit rather than the default. Great tutorial though :D

  • @tegomlee
    @tegomlee Жыл бұрын

    I converted to URP like you said, however the lights aren't working for me. I literally have no idea why, can someone please help.

  • @Dani_Krossing

    @Dani_Krossing

    Жыл бұрын

    When you say the lights aren't working, do you mean everything is dark? Are there still purple textures? Can you describe the issue?

  • @Dani_Krossing

    @Dani_Krossing

    Жыл бұрын

    Without knowing your exact issue, something I can see works for people is to check if the material on your 2D assets are set to a material called "Lit". Since this is the material that allow the 2D lighting to work on the sprite. Others say re-importing all assets work, or re-importing the package.

  • @hellenic_Pontos
    @hellenic_Pontos8 ай бұрын

    hey it not works

  • @RedaHaskouri
    @RedaHaskouri Жыл бұрын

    you didnt explain important things : lighting layers and light orders

  • @Dani_Krossing

    @Dani_Krossing

    Жыл бұрын

    I did cover the layers in the video 🙂 The order seemed self-explanatory since it’s the exact same as when ordering game objects, which is why I decided not to cover them. If you need it explained, then it is just how Unity figures out which light to prioritise, if you have multiple lights stacked.

  • @RedaHaskouri

    @RedaHaskouri

    Жыл бұрын

    @@Dani_Krossing i make a black white 2d game like limbo. ( i create a global light ) and i add a light to make light like a street lamp. but the problem when this light move above any layer have a back sprite, that light gone like turned off and when move it above any layer have a white sprite the light work fine. i tryed many time to change light layers and many things , but dsnt work. sorry about my english , but if you want to help me and help others people you can do a new tutorial about lights with more info. thanks for all sir , and sorry for my english

  • @enriquecajunsheriff4104
    @enriquecajunsheriff4104 Жыл бұрын

    nah this doesn't work

  • @cyberdrunkdev5256
    @cyberdrunkdev5256 Жыл бұрын

    Hey. Is it possible to use the new 2D-lights in 3D-environment?