Example #1
0
        void OnWillCameraRenderThisBeam(Camera cam)
        {
            if (m_Master && cam)
            {
                if (
#if UNITY_EDITOR
                    Utils.IsEditorCamera(cam) || // make sure to call UpdateCameraRelatedProperties for editor scene camera
#endif
                    cam.enabled)                 // prevent from doing stuff when we render from a previous DynamicOcclusionDepthBuffer's DepthCamera, because the DepthCamera are disabled
                {
                    Debug.Assert(cam.GetComponentInParent <VolumetricLightBeam>() == null);
                    UpdateCameraRelatedProperties(cam);
                    m_Master._INTERNAL_OnWillCameraRenderThisBeam(cam);
                }
            }
        }