Esempio n. 1
0
    // 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");
        }
    }
Esempio n. 2
0
 public void CapturePhoto()
 {
     if (NativeCamera.IsCameraBusy())
     {
         return;
     }
     TakePicture(512);
 }
Esempio n. 3
0
 //카메라 여는 함수
 public void takepicture()
 {
     if (NativeCamera.IsCameraBusy())
     {
         return;
     }
     TakePicture(512);
 }
Esempio n. 4
0
        public void CameraButtonAction()
        {
            if (NativeCamera.IsCameraBusy())
            {
                return;
            }

            TakePicture(1024);
        }
    public void TakePictureButton()
    {
        if (NativeCamera.IsCameraBusy())
        {
            return;
        }

        TakePicture(512);
    }
Esempio n. 6
0
    public void TakePicture()
    {
        if (NativeCamera.IsCameraBusy())
        {
            return;
        }

        ProcessImage(512);
    }
Esempio n. 7
0
    void Update()
    {
        if (Input.GetMouseButtonDown(0))
        {
            // Don't attempt to use the camera if it is already open
            if (NativeCamera.IsCameraBusy())
            {
                return;
            }

            TakePicture(512);
        }
    }
Esempio n. 8
0
    // 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);
    }
Esempio n. 9
0
    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();
            }
        }
    }
Esempio n. 10
0
    // 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();
            }
        }
    }