Search Unity

Bug When using Game Object Layers above 8, lighting stops working

Discussion in 'General Graphics' started by strich, Jun 13, 2022.

  1. strich

    strich

    Joined:
    Aug 14, 2012
    Posts:
    375
    We're on Unity 2021.3.2f1 and using URP v12. We recently ran into an issue where some MeshRenderers using the exact same mesh and material but had different colors. After an extensive amount of QA we determined that the layer of the game object was the cause. It appears that in URP Directional Lights can only affect Game Objects that are in the first 8 user-created layers (12 if you include the Unity built-in ones).

    Is this finding actually true? I could not find anything in the documentation stating this link. It is going to be quite an undertaking for us to reconfigure the layer systems we're using to support this.

    I have marked this post as a bug as Unity really needs to far more strongly tell the developer this. I would recommend making this clear in the Game Object layer window AND dropdown boxes as its a serious drawback.
     
  2. strich

    strich

    Joined:
    Aug 14, 2012
    Posts:
    375