Unity 2D Lights and Shadow 2022! || Unity 2D Tutorial

Поділитися
Вставка
  • Опубліковано 23 січ 2025

КОМЕНТАРІ •

  • @AmalieKae
    @AmalieKae 2 роки тому +17

    Thank you SO MUCH! 🙏 I thought I was gonna struggle with this for ages, but you solved my problem in just a few minutes.
    I just wish there was a way to "blur" the edges of the shadows, but I'll probably have to write my own solution for that one. Thanks again!! 🔥

    • @RehopeGames
      @RehopeGames  2 роки тому +1

      Hello Amalie,
      I'm glad the video helped you.
      Also, I'm happy and motivated that you like the video 😊
      Thank you so much for your nice feedback 🙏

    • @DasherZF
      @DasherZF 2 роки тому

      @@RehopeGames I don't have universal rp what do I do

    • @AiRbU380
      @AiRbU380 3 місяці тому

      @@DasherZF alt+f4 :)

  • @imkappy
    @imkappy 2 роки тому +5

    ive taken a break from my game making kick, but i still love watching your tutorials for when i decide to go back!

    • @RehopeGames
      @RehopeGames  2 роки тому +1

      The game making process is challenging. Sometimes we want to give up. that's when we need Re-Hope 😊

    • @Peter_Siri
      @Peter_Siri Рік тому +1

      @@RehopeGames nice

  • @Lajjt
    @Lajjt Рік тому +1

    Wow, this video is incredible! Thank you so much for the super clear illustration and explanation. You definitely have the skills of a great teacher!

    • @RehopeGames
      @RehopeGames  Рік тому

      Thanks a lot for the nice feedback 😊

  • @linsfunbox4052
    @linsfunbox4052 2 місяці тому

    Wonderful tutorials. At 1:51. Remember to change your target Sorting Layers. If you already set a lot layers and want to affect all layers. Choose "All"

  • @2736KOH
    @2736KOH Рік тому +3

    short and clear, Thank a lot dude

  • @herohuntstudios
    @herohuntstudios Рік тому +1

    Very very good bro
    itz eazyest tutorial on light!
    keep it up!
    +1

    • @RehopeGames
      @RehopeGames  Рік тому

      Thank you so much for your nice feedback 🙏

  • @babubrothers
    @babubrothers Місяць тому

    Thanks man, really easy to follow tutorial

  • @msmariiamykhailenko1223
    @msmariiamykhailenko1223 23 дні тому

    You have the best tutorial videos. Could you also explain how to make a point and click 2D game in Unity? 🙏

  • @yasingurses4880
    @yasingurses4880 2 роки тому +2

    Videoların cidden çok başarılı aradığım çoğu şey var devamı gelsin

    • @RehopeGames
      @RehopeGames  2 роки тому

      Merhaba;
      Güzel yorumun için çok teşekkür ederim. 🙏 devamı gelecek ..
      Oyun yapımı zorlu bir süreçtir . Bu süreçte sana sabır ve azim diliyorum , umarım bu yolda hayal ettiğin noktaya gelirsin 😊

    • @yasingurses4880
      @yasingurses4880 2 роки тому

      @@RehopeGames İngilizce konusunda önerebileceğin bir şey var mı
      ?

    • @RehopeGames
      @RehopeGames  2 роки тому

      @@yasingurses4880 Ben de yeni yeni geliştiriyorum. Udemy den kurslar aldım , youtube daki içeriklerden faydalanıyorum. Mümkün olduğunca dile maruz kalmaya çalış derim.

  • @KonigTheV
    @KonigTheV 2 роки тому +2

    This was the perfect Video. THX

  • @stonemass3569
    @stonemass3569 2 роки тому +1

    so great !

  • @Nurgalinchik
    @Nurgalinchik 2 роки тому +2

    Thank you so much, I love you!

    • @RehopeGames
      @RehopeGames  2 роки тому +1

      😊😊 Thanks a lot! you're so kind.

  • @goldenapple801
    @goldenapple801 Рік тому +2

    Short and sweet! One question, is there any ways to adjust so the shadow hides other gameobjects behind? My shadows are casting on some gameobjects but their visibility is not affected

    • @RehopeGames
      @RehopeGames  Рік тому +1

      If you want an object to be affected by light, make sure that the sprite type is Lit. and you can choose which layers that light will affect through a light object.
      Thanks 🙏

  • @carrotlee7326
    @carrotlee7326 Рік тому +1

    You are the best!

  • @wolffin4422
    @wolffin4422 Рік тому +1

    01:05, after that my textures become not clear. how to fix it?

    • @RehopeGames
      @RehopeGames  Рік тому +1

      I think you must , quality setting from URP

  • @HindiBalak
    @HindiBalak Рік тому +1

    You are awesome sir❤❤❤❤❤

    • @RehopeGames
      @RehopeGames  Рік тому

      Thank you so much for your nice feedback 🙏🙏

  • @PeterJohnson76
    @PeterJohnson76 Рік тому +1

    I can get lights to illuminate my QUAD background but cant get shadows working.

  • @VladmirPutin926
    @VladmirPutin926 2 роки тому +2

    I went to update my render piler out of nowhere the 2D light sprite and the others are not available.

  • @NguyễnDuy-d8f
    @NguyễnDuy-d8f 29 днів тому

    Why doesn't my sprite turn black when I change the material to sprite lit default?

  • @alidemorg
    @alidemorg Рік тому +1

    helpful and quick. Thank you!

  • @yousfyasser2362
    @yousfyasser2362 2 роки тому +4

    Great tutorial, can you do a tutorial on making a game shop that has skins and can buy with coins

    • @RehopeGames
      @RehopeGames  2 роки тому +1

      Hello and Thanks 😊
      I plan to share a series that shows the game making process from scratch to the end. The video you want will be in that series. Stay in follow 😉

    • @yousfyasser2362
      @yousfyasser2362 2 роки тому

      Thanks, I hope we can get that series with deep explanation of everything!

    • @RehopeGames
      @RehopeGames  2 роки тому

      @@yousfyasser2362 Absolutely ✌

  • @brun3tto
    @brun3tto 2 роки тому +2

    thanks a lot for the tutorial, it helped me!

    • @RehopeGames
      @RehopeGames  2 роки тому

      Glad to hear that! thank you so much 😊

  • @karacahuseyin
    @karacahuseyin Рік тому +1

    Thank you so much, nice explanation bro🪄

  • @arjunvenugopal4763
    @arjunvenugopal4763 2 роки тому +1

    Nice tutorial 👍

  • @Atakan1295
    @Atakan1295 2 роки тому +1

    abiieeee güzle videomuş

    • @RehopeGames
      @RehopeGames  2 роки тому

      Teşekkür ederim. daha güzelleri yolda 😊

  • @gohstraf3727
    @gohstraf3727 Рік тому +1

    If I wanna add light here is only the normal light variants. I downloaded the package but it doesnt work. can someone please help me?

    • @RehopeGames
      @RehopeGames  Рік тому

      Hello, Just downloading the package is not enough.
      You need to make some settings. please make sure you follow the video step by step.

  • @receltahinsogan3054
    @receltahinsogan3054 2 роки тому +1

    thank you so much for this video, you made me learn lots of usefull stuff as a beginner

    • @RehopeGames
      @RehopeGames  2 роки тому

      Oyun yapma serüveninizde başarılar dilerim. Güzel yorumunuz için teşekkür ederim 😊

    • @receltahinsogan3054
      @receltahinsogan3054 2 роки тому

      @@RehopeGames Ben teşekkür ederim Türkçe biliyor olmanız ayrıca mutlu etti :D

  • @Hiedalle
    @Hiedalle Рік тому +1

    5:43 can you stop the shadows from going through the floor?

    • @RehopeGames
      @RehopeGames  Рік тому

      You can do it by adding shadow caster2D to the floor.

    • @Hiedalle
      @Hiedalle Рік тому

      @@RehopeGames thanks for the fast reply. do you by chance have tried to add this to a "raw image" component instead of a sprite? i use transparent videos on a canvas in unity, and currently the 2d light does not seem to have any effect.

    • @Hiedalle
      @Hiedalle Рік тому

      anyway, i figured it out, the light works but only in scene mode. if i switch to game mode the light does not seem to be included...

    • @Hiedalle
      @Hiedalle Рік тому

      i also figured this. only think now the light does not follow the player...

  • @wolffin4422
    @wolffin4422 Рік тому +2

    Help me please! How to make light like in "Dome Keeper"?

    • @RehopeGames
      @RehopeGames  Рік тому

      You will find the answer to this question in the next video (After 2 Days) , Stay tuned...

    • @wolffin4422
      @wolffin4422 Рік тому

      @@RehopeGames ok i will wait.

  • @scholars786
    @scholars786 Рік тому +1

    Nice

  • @calavero7453
    @calavero7453 11 місяців тому +1

    Subscribed at min 1:44. Thank you

  • @StaviKay
    @StaviKay Рік тому +1

    Thanks bro this helped me

    • @RehopeGames
      @RehopeGames  Рік тому

      Thanks for your feedback 😊 I'm glad helped you

  • @mohammadkh8091
    @mohammadkh8091 Рік тому +1

    very nice tutorial thank you

  • @tikikong384
    @tikikong384 2 роки тому +1

    Amazing! Thank you

  • @forestgump2081
    @forestgump2081 Рік тому

    Hi. Here's a question. Earlier I used another material Diffuse, which darkened the objects a bit. But now it burns pink colour because of the new material from the video. If I delete the new material in the project settings, everything is back to normal.
    Can I use these two materials? Or at least use 1 variant on one stage and the other variant on the second stage

    • @RehopeGames
      @RehopeGames  Рік тому

      I'm sorry for the late response, did you manage to solve the problem ?

  • @alxdrksoul
    @alxdrksoul 2 роки тому +4

    Awesome tutorial, thank you :D ok I have a question, what if I don't want objects to cast shadows, but instead I don't want the player to see what is behind the object blocking the light, kind of how "among us" works.

    • @RehopeGames
      @RehopeGames  2 роки тому

      Hello ;
      Firstly, thank you so much. With Raycast you can control the areas that the player sees.

  • @christophermohite537
    @christophermohite537 Рік тому +1

    I wanted to add light on my tile map but it is not casting a shadow, can you please make a video on how I can fix it

    • @RehopeGames
      @RehopeGames  Рік тому

      This video is for you 👌
      ua-cam.com/video/n3tgimClTrI/v-deo.html

  • @LoOnarForge
    @LoOnarForge 7 місяців тому

    Thanks for the great video, one tip: Loos that random music. No one wants it in a lesson. :)

  • @rdev3720
    @rdev3720 Рік тому

    Dumb question but the shadow caster is really blurry. i have tweaked shadow settings in the post processing profile but nothing works?

    • @RehopeGames
      @RehopeGames  Рік тому

      Hi ,
      Please look at this video ua-cam.com/video/Ra26YGd5o5g/v-deo.html (first 1 min)

  • @swezyys
    @swezyys 10 місяців тому +1

    ÇOK TEŞEKKÜRLER

  • @alson_chueh
    @alson_chueh 10 місяців тому +1

    Good ~~~~~~~~~~~~~~🥳

  • @Cabrix-h8q
    @Cabrix-h8q 6 місяців тому

    The shader does not works, i have done every thing possible but It does not work there Is the light but no shadow

  • @tristanbluu
    @tristanbluu Рік тому +1

    Hello, thank you for this video and its simplicity. I was curious if there was a way to connect the light to the mouse.

    • @RehopeGames
      @RehopeGames  Рік тому

      Hello 😀
      Yes you can do it. Get mouse position and carry the light mouse position.
      Thanks for nice feedback 😊

  • @Lawlesed
    @Lawlesed 5 місяців тому

    omg, thanks!

  • @johnsmiths3934
    @johnsmiths3934 Рік тому +3

    thank you so much but please show us how to create the game environment like yours or if you can give us your sprites to use in practice thanks

    • @RehopeGames
      @RehopeGames  Рік тому

      Thank you for your interest, I will work on this topic

  • @Zakariyae00
    @Zakariyae00 Рік тому +1

    Thank you bro !

  • @mathis4949
    @mathis4949 Рік тому +1

    Hi bro, how you got the mat SPrite Lit Default ?

    • @RehopeGames
      @RehopeGames  Рік тому

      Did you install Universal RP package ?
      Also you can watch this video ua-cam.com/video/r_7799K0-XQ/v-deo.html

    • @mathis4949
      @mathis4949 Рік тому

      @@RehopeGames yh but i still dont have the mat, but dont worry i find a link just for download this mat, thx for your answer and great video.

  • @leclisse7
    @leclisse7 Рік тому +1

    Thank you!

  • @turbo1419
    @turbo1419 Рік тому +1

    thank you sm👌🏽👌🏽👌🏽👌🏽

    • @RehopeGames
      @RehopeGames  Рік тому

      Thanks for your nice feedback 😊

  • @dinhphatphat
    @dinhphatphat Рік тому +1

    thanks, sir!

  • @cool_gamertag4488
    @cool_gamertag4488 Рік тому +1

    thanks for the help

  • @Hiedalle
    @Hiedalle Рік тому +1

    hi again, did you manage to exclude some assets from being lit?

    • @RehopeGames
      @RehopeGames  Рік тому

      Hi 😊
      You can determine which layers will be affected by light with Target Sorting Layer ( in the light object>Light 2D>Target Sorting Layer).

    • @Hiedalle
      @Hiedalle Рік тому

      @@RehopeGames i thought so too, but i am using a canvas and somehow the sorting layers do not have any effect.

    • @RehopeGames
      @RehopeGames  Рік тому

      @@Hiedalle canvas objects are not affected by light

    • @Hiedalle
      @Hiedalle Рік тому

      @@RehopeGames well i managed to add lights to the ojects within the canvas but i am havig trouble excluding some of the objects from being lit.

  • @mupadamono1275
    @mupadamono1275 Рік тому +1

    How do I smooth the edges of the generated shadows?

    • @RehopeGames
      @RehopeGames  Рік тому

      I understand what you want, I've searched a lot, but unfortunately I haven't found a solution yet. I hope you find a solution and you share with me 😊

    • @lehcaR_0731
      @lehcaR_0731 Рік тому

      The community began to call for this demand in 2020, and the official has not yet resolved it...

  • @thesituation5315
    @thesituation5315 Рік тому +1

    Do you know how to do this in a script? Also global light isn't showing up in Lights.

    • @RehopeGames
      @RehopeGames  Рік тому

      Hello, did you follow me step by step ( for installation ).
      You can access component and feature of the light from a script.

  • @kalle-the-twitch-one
    @kalle-the-twitch-one Рік тому

    hey dude, i think i'm bumb, when i enable the shadows option in the light settings it does not work

    • @RehopeGames
      @RehopeGames  Рік тому

      Hi , did you solve this problem ?

    • @kalle-the-twitch-one
      @kalle-the-twitch-one Рік тому

      @@RehopeGames yeah dude, symply i was not using a regtangoular shaped object and the Shadow caster shape wasn't correct

  • @MriLyn
    @MriLyn Рік тому +1

    Nice Video! It works fine, but the shadows are little bit pixelated. How do I fix that ?

    • @RehopeGames
      @RehopeGames  Рік тому

      I explained it in this video ua-cam.com/video/r_7799K0-XQ/v-deo.html.
      Thanks 🙏

  • @4xh9
    @4xh9 Рік тому +1

    thx big love from syria 🥰🥰

  • @bijin7510
    @bijin7510 Рік тому

    how to make shadow in topdown game not infinite? (When using shadow caster 2d) I searched for a long time on the Internet for a solution but did not find a solution

    • @RehopeGames
      @RehopeGames  Рік тому

      what exactly do you want to do do you want to reduce the distance of the shadow.

    • @bijin7510
      @bijin7510 Рік тому

      @@RehopeGames Yes, but so far the only thing I've come up with is to add light to the subject and darken it, but it doesn't look good

  • @Cabrix-h8q
    @Cabrix-h8q 6 місяців тому

    Ah no ok now i understood , the mine is a pixel_game, so even if i put the trim edge only 0.1 the shadow disappear, thank you very much

  • @erengungor7501
    @erengungor7501 Рік тому +1

    thanks a lot

  • @RenkoGSL
    @RenkoGSL Рік тому

    Please tell me what songs are playing 0.0

    • @RehopeGames
      @RehopeGames  Рік тому

      I've download the music from Artlist.io .
      But I forgot the name.

  • @mustafatanirli
    @mustafatanirli 2 роки тому +1

    Kral iyi misin 3 haftadır yoksun ?

    • @RehopeGames
      @RehopeGames  2 роки тому

      teşekkür ederim iyiyim 😊 2 güne geliyorum inşaallah 😉

  • @iamguy0004
    @iamguy0004 Рік тому +1

    Thank

  • @RivenbladeS
    @RivenbladeS Рік тому +2

    Good for mobile?

    • @DajjalSlayers
      @DajjalSlayers Місяць тому +1

      no even though it's a high end mobile device

  • @benjaroman5071
    @benjaroman5071 2 роки тому +1

    for some reason my unity doesnt show me all the options in rendering as in the video, my unity is updated

    • @RehopeGames
      @RehopeGames  2 роки тому +1

      My unity version is 2021.3.6f1.

  • @saniainez
    @saniainez Рік тому +1

    Edit: I don't know what happened. It suddenly works out of the blue. Thank you 😂😂😂
    If you don't mind helping a student:
    After I changed all of the materials to Sprite Lit Default, nothing is affected by the Global Light. I followed every step in my Unity 2021.3.21.

    • @RehopeGames
      @RehopeGames  Рік тому

      😀Hi , did solve this problem ?

    • @saniainez
      @saniainez Рік тому +1

      @@RehopeGames yes, it suddenly works, out of nowhere 🤣
      Thank you for the video ✨

    • @RehopeGames
      @RehopeGames  Рік тому +1

      @@saniainez 😀👍

  • @juanbelmonth1594
    @juanbelmonth1594 Рік тому

    ty

  • @FortbloxNET
    @FortbloxNET Рік тому

    Shadow from the platform going through the floor is kind of bad. If the video would show how to block the shadow going through the wall it would have SOME value. 🫡

  • @killdeer
    @killdeer Рік тому

    Even though I changed Tilemap to Sprite Lit Default it is not effected by the light?

    • @killdeer
      @killdeer Рік тому +1

      Never mind. Its because the Target Sorting Layers was set to Default and my Tilemap has its own sorting layer!

    • @RehopeGames
      @RehopeGames  Рік тому

      😊👍

  • @aleksandraaleksandra7934
    @aleksandraaleksandra7934 Рік тому +1

    Thank you!

  • @nati7728
    @nati7728 Рік тому +1

    Thank you!