// Update is called once per frame void Update() { if (Input.GetMouseButtonDown(0)) { // Eğer kamera meşgulse bir şey yapma if (NativeCamera.IsCameraBusy()) { return; } if (Input.mousePosition.x < Screen.width / 2) { // Kamera ile resim çek // Eğer resmin genişliği veya yüksekliği 512 pikselden büyükse, resmi ufalt //ResimCek(512); } else { //ResimCek(512); } } if (Input.GetKeyDown(KeyCode.Escape)) { Application.LoadLevel("OcrGaleryScene"); } }
public void CapturePhoto() { if (NativeCamera.IsCameraBusy()) { return; } TakePicture(512); }
//카메라 여는 함수 public void takepicture() { if (NativeCamera.IsCameraBusy()) { return; } TakePicture(512); }
public void CameraButtonAction() { if (NativeCamera.IsCameraBusy()) { return; } TakePicture(1024); }
public void TakePictureButton() { if (NativeCamera.IsCameraBusy()) { return; } TakePicture(512); }
public void TakePicture() { if (NativeCamera.IsCameraBusy()) { return; } ProcessImage(512); }
void Update() { if (Input.GetMouseButtonDown(0)) { // Don't attempt to use the camera if it is already open if (NativeCamera.IsCameraBusy()) { return; } TakePicture(512); } }
// Records a video, using https://github.com/yasirkula/UnityNativeCamera private void RecordVideo() { gameObject.transform.Find("Explanation").gameObject.SetActive(false); if (NativeCamera.IsCameraBusy()) { output.text = ("Camera Busy"); return; } vidTime = DateTime.Now + new TimeSpan(0, 0, 4); // TODO can we do better than just "it'll start in 4 seconds"? NativeCamera.Permission permission = NativeCamera.RecordVideo(HandleVideo, NativeCamera.Quality.Low); Debug.Log("Permission result: " + permission); }
void Update() { if (Input.GetMouseButtonDown(0)) { // Don't attempt to use the camera if it is already open if (NativeCamera.IsCameraBusy()) { return; } if (Input.mousePosition.x < Screen.width / 2) { // Take a picture with the camera // If the captured image's width and/or height is greater than 512px, down-scale it TakePicture(512); } else { // Record a video with the camera RecordVideo(); } } }
// Update is called once per frame void Update() { if (Input.GetMouseButtonDown(0)) { // Eğer kamera meşgulse bir şey yapma if (NativeCamera.IsCameraBusy()) { return; } if (Input.mousePosition.x < Screen.width / 2) { // Kamera ile resim çek // Eğer resmin genişliği veya yüksekliği 512 pikselden büyükse, resmi ufalt ResimCek(512); } else { // Kamera ile video kaydet VideoKaydet(); } } }