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

Поделиться
HTML-код
  • Опубликовано: 4 фев 2025

Комментарии • 154

  • @AmalieKae
    @AmalieKae 2 года назад +18

    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 года назад +2

      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 4 месяца назад

      @@DasherZF alt+f4 :)

  • @imkappy
    @imkappy 2 года назад +6

    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 года назад +2

      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

  • @Nurgalinchik
    @Nurgalinchik 2 года назад +2

    Thank you so much, I love you!

    • @RehopeGames
      @RehopeGames  2 года назад +1

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

  • @babubrothers
    @babubrothers Месяц назад

    Thanks man, really easy to follow tutorial

  • @msmariiamykhailenko1223
    @msmariiamykhailenko1223 Месяц назад

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

  • @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 🙏

  • @BasighaBliss
    @BasighaBliss 2 дня назад

    Hello Sir you do really good videos, I wish to ask where I can get assets like the once you use in your videos?

  • @KonigTheV
    @KonigTheV 2 года назад +2

    This was the perfect Video. THX

  • @alidemorg
    @alidemorg Год назад +1

    helpful and quick. Thank you!

  • @HindiBalak
    @HindiBalak Год назад +1

    You are awesome sir❤❤❤❤❤

    • @RehopeGames
      @RehopeGames  Год назад

      Thank you so much for your nice feedback 🙏🙏

  • @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.

  • @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 🙏

  • @calavero7453
    @calavero7453 Год назад +1

    Subscribed at min 1:44. Thank you

  • @karacahuseyin
    @karacahuseyin Год назад +1

    Thank you so much, nice explanation bro🪄

    • @RehopeGames
      @RehopeGames  Год назад +1

      Teşekkürler dostum 😊

    • @karacahuseyin
      @karacahuseyin Год назад

      @@RehopeGames Türk' müsün dostum?

    • @RehopeGames
      @RehopeGames  Год назад

      @@karacahuseyin Evet , Türk'üm .

    • @karacahuseyin
      @karacahuseyin Год назад +1

      @@RehopeGames abone olundu o zaman 🙂

  • @brun3tto
    @brun3tto 2 года назад +2

    thanks a lot for the tutorial, it helped me!

    • @RehopeGames
      @RehopeGames  2 года назад

      Glad to hear that! thank you so much 😊

  • @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 ✌

  • @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

  • @LoOnarForge
    @LoOnarForge 7 месяцев назад

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

  • @mohammadkh8091
    @mohammadkh8091 Год назад +1

    very nice tutorial thank you

  • @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 😊

  • @StaviKay
    @StaviKay Год назад +1

    Thanks bro this helped me

    • @RehopeGames
      @RehopeGames  Год назад

      Thanks for your feedback 😊 I'm glad helped you

  • @stonemass3569
    @stonemass3569 2 года назад +1

    so great !

  • @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

  • @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.

  • @FortbloxNET
    @FortbloxNET Год назад +1

    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. 🫡

  • @turbo1419
    @turbo1419 Год назад +1

    thank you sm👌🏽👌🏽👌🏽👌🏽

    • @RehopeGames
      @RehopeGames  Год назад

      Thanks for your nice feedback 😊

  • @wolffin4422
    @wolffin4422 2 года назад +2

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

    • @RehopeGames
      @RehopeGames  2 года назад

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

    • @wolffin4422
      @wolffin4422 2 года назад

      @@RehopeGames ok i will wait.

  • @PeterJohnson76
    @PeterJohnson76 Год назад +1

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

  • @arjunvenugopal4763
    @arjunvenugopal4763 2 года назад +1

    Nice tutorial 👍

  • @alson_chueh
    @alson_chueh 10 месяцев назад +1

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

  • @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 ruclips.net/video/r_7799K0-XQ/видео.html.
      Thanks 🙏

  • @scholars786
    @scholars786 Год назад +1

    Nice

  • @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...

  • @tikikong384
    @tikikong384 2 года назад +1

    Amazing! Thank you

  • @NguyễnDuy-d8f
    @NguyễnDuy-d8f Месяц назад

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

  • @4xh9
    @4xh9 Год назад +1

    thx big love from syria 🥰🥰

  • @Zakariyae00
    @Zakariyae00 Год назад +1

    Thank you bro !

  • @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 👌
      ruclips.net/video/n3tgimClTrI/видео.html

  • @cool_gamertag4488
    @cool_gamertag4488 Год назад +1

    thanks for the help

  • @carrotlee7326
    @carrotlee7326 Год назад +1

    You are the best!

  • @wolffin4422
    @wolffin4422 2 года назад +1

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

    • @RehopeGames
      @RehopeGames  2 года назад +1

      I think you must , quality setting from URP

  • @dinhphatphat
    @dinhphatphat Год назад +1

    thanks, sir!

  • @VladmirPutin926
    @VladmirPutin926 2 года назад +2

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

  • @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

  • @leclisse7
    @leclisse7 2 года назад +1

    Thank you!

  • @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 ruclips.net/video/r_7799K0-XQ/видео.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.

  • @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.

  • @Atakan1295
    @Atakan1295 2 года назад +1

    abiieeee güzle videomuş

    • @RehopeGames
      @RehopeGames  2 года назад

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

  • @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.

  • @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 ?

  • @swezyys
    @swezyys 10 месяцев назад +1

    ÇOK TEŞEKKÜRLER

  • @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 ruclips.net/video/Ra26YGd5o5g/видео.html (first 1 min)

  • @iamguy0004
    @iamguy0004 Год назад +1

    Thank

  • @Lawlesed
    @Lawlesed 6 месяцев назад

    omg, thanks!

  • @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.

  • @erengungor7501
    @erengungor7501 Год назад +1

    thanks a lot

  • @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

  • @mupadamono1275
    @mupadamono1275 2 года назад +1

    How do I smooth the edges of the generated shadows?

    • @RehopeGames
      @RehopeGames  2 года назад

      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...

  • @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

  • @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.

  • @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

  • @RivenbladeS
    @RivenbladeS Год назад +2

    Good for mobile?

    • @DajjalSlayers
      @DajjalSlayers Месяц назад +1

      no even though it's a high end mobile device

  • @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

  • @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 😉

  • @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.

  • @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!