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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Prevent Light from Spilling over

Discussion in 'General Graphics' started by mrsteamfist, Aug 18, 2016.

  1. mrsteamfist

    mrsteamfist

    Joined:
    Nov 3, 2015
    Posts:
    19
    So I have a panel which gets spot lighted when selected. I am trying to prevent my spot light from spilling over onto other panels. I am sure I have to do this programmatically. Any ideas?

    Thanks,
    Christopher
     
  2. FreeFly90

    FreeFly90

    Joined:
    May 28, 2016
    Posts:
    177
    It might be an overkill, but you could try to move them on a different layer...
     
    mrsteamfist and theANMATOR2b like this.
  3. mrsteamfist

    mrsteamfist

    Joined:
    Nov 3, 2015
    Posts:
    19
    You know what, that is a really simple way to solve that issue! Thanks!

    For those newbs like me:
    Solution - Set the culling mask of the light to the same layer of the selected object! DONE!
     
    theANMATOR2b and FreeFly90 like this.