Culling Mask Support for ImmediateModeShapeDrawer in Editor Camera
Camera culling mask support was added to the ImmediateModeShapeDrawer in 3.1.0.
In its current implementation layer culling is only applied for cameras of CameraType.Game and CameraType.VR, and not CameraType.SceneView. I believe that this is unintuitive behavior.
When in the editor, the user can choose to enable or disable layer visibility in their scene view using the Dropdown in the very top-right of the UI:
Modifying this dropdown sets the culling mask of all scene view cameras. Any object marked with a layer that is not set will therefore not be visible in the scene view.
However with the current implementation, ImmediateModeShapeDrawer objects that have useCullingMask enabled will still be visible in the scene view even if their layer does not match editor scene view culling mask that the user has set.
fixed in 3.2.0