public void SwitchCamera(CameraStringEntry newCurrentCamera) { currentCamera = newCurrentCamera; currentCamera.camera.gameObject.SetActive(true); cameras.ForEach(x => { if (x.Name == currentCamera.Name) return; x.camera.gameObject.SetActive(false); Debug.LogFormat("deactivating {0}", x.camera); }); }
public void SwitchCamera(CameraStringEntry newCurrentCamera) { currentCamera = newCurrentCamera; currentCamera.camera.gameObject.SetActive(true); cameras.ForEach(x => { if (x.Name == currentCamera.Name) { return; } x.camera.gameObject.SetActive(false); Debug.LogFormat("deactivating {0}", x.camera); }); }