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. Join us on March 30, 2023, between 5 am & 1 pm EST, in the Performance Profiling Dev Blitz Day 2023 - Q&A forum and Discord where you can connect with our teams behind the Memory and CPU Profilers.
    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:
    13
    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.