Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  3. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Feature Request Ability to choose which ShadowCasters are affected by which lights (by layer?)

Discussion in '2D Experimental Preview' started by AlexVillalba, Dec 28, 2020.

  1. AlexVillalba

    AlexVillalba

    Joined:
    Feb 7, 2017
    Posts:
    346
    Hi everybody, it would be nice to be able to choose which 2D lights cast shadows using which shadow casters. Currently we can choose which Sorting Layers are affected by lights and which Sorting Layers receive the shadows of shadow casters, but imagine I have 2 layers in my game level, and there is one light in each layer (one layer is over the other in the Z axis, they have different Order in Layer); I want each light illuminate and cast shadows in their respective layers.

    Apart from that example, I have a real case: I need a light to cast shadows for every shadow caster but for the protagonist's, which casts shadows for the rest of lights. The protagonist carries a kind of torch, which is too close to his shadowcaster, which may produce ugly shadow effects.

    As a suggestion, lights and shadowcasters could be limited (optionally) to a range of Order in Layers.