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

Use point light2d as a sprite mask?

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

  1. fajerbujt

    fajerbujt

    Joined:
    Feb 29, 2020
    Posts:
    14
    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.