Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

2d lighting

Discussion in '2D' started by dani567, Nov 16, 2022.

  1. dani567

    dani567

    Joined:
    Mar 24, 2020
    Posts:
    2
    Hi! i would like to know if somebody can tell me or recommend any tutorial to get this style of lighting?
    any help is welcome
    thanks!
     
  2. Cornysam

    Cornysam

    Joined:
    Feb 8, 2018
    Posts:
    1,353
    There are some basics here: upload_2022-11-16_16-5-19.png
     
    Kurt-Dekker likes this.
  3. dani567

    dani567

    Joined:
    Mar 24, 2020
    Posts:
    2
  4. Xiangting_Su

    Xiangting_Su

    Unity Technologies

    Joined:
    Sep 22, 2020
    Posts:
    246
    Yes those are some of the great tutorials!

    Also @dani567, here are some small tips (which I wish I knew when I first started):

    Remember to install the URP package in the Package Manager in order to see the 2D Lights options (Sprite Light 2D, Spot Light 2D, Global Light 2D, Freeform Light 2D) in the Light menu.

    2D Lights.png

    Else, an easier way is to start off with a 2D (URP) Template when you create a new Project in the Unity Hub. This new Project will then have all the 2D packages including the URP package installed and ready to use.

    Also, you can try adding a Shadow Casters 2D to any Game Objects which you would like to cast the shadows. Just note, to be able to see the shadows, remember to enable the Shadows in the Lights 2D Inspector.

    Enable Shadows.png

    In addition, if you find yourself battling with unwanted overlapping shadows, there's the Composite Shadow Caster 2D which merges the shape of multiple Shadow Caster 2Ds together as a single Shadow Caster 2D. Just remember to parent those Game Objects to this Game Object with the Shadow Caster 2D component.

    Lastly, have fun!
     
    Cornysam likes this.