public void AddCamera(Camera cam)
        {
            var camData = cam.GetUniversalAdditionalCameraData();

            if (camData.renderType == CameraRenderType.Overlay)
            {
                cam.cullingMask = GameLayers.layerMask(GameLayer.OverlayCamera);
                if (!overlayCams.Contains(cam))
                {
                    overlayCams.Add(cam);
                }
                InjectOverlayToActiveMainCams(cam);
            }
            else
            {
                if (!mainCams.Contains(cam))
                {
                    mainCams.Add(cam);
                }
                InjectOverlayCameras(camData);
                UpdateMainCamsActiveStatus(cam);
                FilterDeadCams();
            }
        }
예제 #2
0
 private void SetupCamera()
 {
     //m_cameraData = m_overlayCam.GetUniversalAdditionalCameraData();
     m_overlayCam.cullingMask = GameLayers.layerMask(GameLayer.OverlayCamera);
 }