Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. 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
  3. Dismiss Notice

Use point light2d as a sprite mask?

Discussion in '2D Experimental Preview' started by fajerbujt, Oct 7, 2020.

  1. fajerbujt


    Feb 29, 2020
    How would I go about using a point light2d as a sprite mask? I have a point light that represents the players "field of view" and I'm trying to make it so some objects are only visible if they are being lit by the player. My current thought is that I modify/create a sprite with the same shape as the light & then use that in a sprite mask, but I'm not sure how to go about doing that. Also there might be a better solution by customizing the renderer? Anyone have any ideas or could point me in the right direction to implement the feature?

    Im using URP with the 2D Renderer & Unitys own 2d lights.