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(); } }
private void SetupCamera() { //m_cameraData = m_overlayCam.GetUniversalAdditionalCameraData(); m_overlayCam.cullingMask = GameLayers.layerMask(GameLayer.OverlayCamera); }