Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only. On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live. Read our full announcement for more information and let us know if you have any questions.

2D Lights with Canvas

Discussion in '2D' started by tildebox, Feb 8, 2021.

  1. tildebox

    tildebox

    Joined:
    Nov 6, 2018
    Posts:
    38
    Hi, I have a 2020.1.1 2D "Universal Render Pipeline" project.

    I add 2D lights to the scene like "Point Light 2D" and they work.

    But that's not what I want. I wanna use 2D lights with my Canvas (Screen Space - Overlay)!

    If I add 2D lights to the canvas they don't work.

    Do I have to activate something in the settings?
     
    Last edited: Feb 8, 2021
  2. RevengerWizard

    RevengerWizard

    Joined:
    Feb 15, 2020
    Posts:
    15
    Just add to the UI Images the Sprite Lit Material. Don't know if works with Overlay Screen Space, but with Camera ScreenSpace works well.
    Cheers.
     
  3. vishwajeetgautam999

    vishwajeetgautam999

    Joined:
    Jun 30, 2021
    Posts:
    2
    Thank you RevengerWizard it worked!
     
  4. Posey50

    Posey50

    Joined:
    Sep 22, 2022
    Posts:
    1
    Hello, i don't find this Sprite Lit Material, where is it and where should i put it in unity exactly ?
     
  5. Damongii

    Damongii

    Joined:
    Jan 3, 2024
    Posts:
    1
    This might be a bit late, but if you check the Material of the "Image" component and then press the Eye Symbol to show all of the Materials, you'll be able to access it.