Hi there,
i want to exclude certain Objects from my 2D Global Light. By normal i would move all those objects on a new Layer and use the Culling Mask to hide them. But unfortunately culling mask is not avaiable for 2D lights. Does anybody know any other solution, or how to implement Culling mask?
I also tried to access the light’s culling mask via script with light.cullingMask, (Unity - Scripting API: Light.cullingMask) but this Method doesnt exist.
Not quite sure what you want but for Light2D there is a Sorting Layer for lights that lets you have a light specifically only illuminate certain objects in the same layer. But maybe by “hide” you mean something else.
See timestamp 12:35
Thank you so much! i didn’t know about sorting layers ![]()
Hi, i know how sorting layer works but i need to use “Culling Mask” for a light in my game. It’s a 2D game, then i use Point Light 2D, but the field culling mask is not present. However the field culling mask is still present for 3D lights. I don’t see how can i do to solve my problem.
My goal : I have 2 types of characters (A and B). I want to make a nightvision only for character B.
That i tried : I have 2 cameras, one for A character and one for B. I have a Layer NigthVision. In the culling mask of camera_A i disable NightVision. In camera_B i enable NightVision. Then, i make a Point Light 2D and apply Layer NightVision → It’s doesn’t work because light is ingnored by the culling mask of the camera. I tried that with a cube, it works but not with a 2D light. It’s for that i need to access to the culling mask field on the Point Light 2D.
I didn’t find a solution on the web. Thank you for your help


Really hard to know what you specifically want without an illustration or example you want to emulate. There are tons of different ways such an effect could look visually.
Thank you Lo-renzo for your reply. It’s my first question in 3 year of dev, usually i always find a solution on the web, but fort that issue i’m totally blocked. I will try to explain with more details.
I make a 2D multiplayer game. In the beginning of the game, each player get a role (Human or Alien). The game is totally in the dark (URP + Lit materials) :
- Humans can see in the dark with a spotlight (Point Light 2D) → It works
- I want that Aliens can see in the dark with a sort of night vision. For simulate that, i think to just add a green (Point Light 2D)
Actually, Aliens can see the spotlight of Humans → It’s good.
But the problem, Humans can see the night vision (Point Light 2D) of the Aliens.
I want to hide night vision light of Aliens for Humans.
For that, i created one camera for Humans and one for Aliens. I created one new Layer called “NightVision” for use culling mask on these cameras :
- On Human_Camera i disabled “NightVision” for culling mask field
- On Alien_Camera i enabled “NightVision” for culling mask field
- On the green (Point Light 2D) of the alien prefab, i selected “NightVision” for layer field
With this configuration, the Human_Camera display green (Point Light 2D) of the Alien → My technic doesn’t work to hide this light for Human_Camera, because the culling mask of the camera doesn’t work with lights. I tried with a cube it works, but not with a light. I’m blocked.
I tried another technic with the field culling mask directly on the light. However this field is present for 3D lights but not for 2D Lights (Check screens in my first reply). I think it’s for that Fluffy_me maked this post in the beginning. Then, i saw your reply and a i tried your technic with “Sorting Layers” but it doesn’t work in my case.
Below, i put screenshots to illustrate my issue. Think to observate Green Light → Night vision of Alien, White Light → Spotlight of Human, and a cube → It’s a test to show you that culling mask of camera work on object but not on the green light.
Thank you for any help, if you had other technic to try, please send a reply.


I make a new reply for the last screenshot. It’s that i want but i’m blocked. Thank you for your help
If it’s a 2D multiplayer where a player is either a human or alien, then you probably can enable/disable two different lights with different settings depending on if the player is a human or alien.
So, upon loading a level turn on whichever light configuration for the class the player is playing as. If alien, turn on lights for both alien and human. If player is human, turn on only human lights so that aliens remain in the dark. This can be done with enable/disable, nothing on the camera. Different clients have different light configurations.
Thank you Lo-renzo. My problem was resolved with a Unity upgrade on version 2020.1.11f1 to 2020.2.1f1. Camera culling mask on 2D lights works with this new version



