public class troubleshootLightCullingMask : MonoBehaviour {
// Update is called once per frame
void Update () {
var _light = this.GetComponent<Light>();
_light.cullingMask = int.MaxValue;
}
}
When adding this script to a GameObject with light, the log file is flooded with the following warnings:
Too many layers used to exclude objects from lighting. Up to 4 layers can be used to exclude lights, while your lights use 5: ‘Default’ ‘UI’ ‘L16-SceneRealtime1’ ‘L24-CollectableItems+IgnoredByFlashlight’ ‘Unnamed 31’
It is not setting the the layer 31 bit:
.[/CODE]
