private void TryDecodeQRCode()
 {
     if (QRCodeScanner.GetWebCameraFeed().didUpdateThisFrame)
     {
         DisplayCamera();
         DecodeQRCode();
     }
 }
    private void DecodeQRCode()
    {
        string result = QRCodeScanner.DecodeCurrentFrame();

        if (result != null)
        {
            Debug.Log(result);
        }
    }
Beispiel #3
0
        private void prepare()
        {
            scanner               = new QRCodeScanner();
            scanner.Width         = 400;
            scanner.Height        = 400;
            scanner.ScanComplete += QRCodeScanner_ScanComplete;
            scanner.Error        += QRCodeScanner_Error;

            pnlScanner.Children.Clear();
            pnlScanner.Children.Add(scanner);
        }
Beispiel #4
0
        public static void OpenQRCodeScanner()
        {
            var lastScene = Instance.currentScene;
            var qRScanner = new QRCodeScanner();

            qRScanner.Load();
            Instance.currentScene  = qRScanner;
            Instance.qRCodeScanner = qRScanner;

            SceneManager.LoadSceneAsync("Scenes/QRCodeScanner");

            CloseScene(lastScene);
        }
 private void DisplayCamera()
 {
     _cameraDisplay.texture = QRCodeScanner.GetWebCameraFeed();
     _cameraDisplay.rectTransform.localEulerAngles = new Vector3(0, 0, -QRCodeScanner.GetWebCameraFeed().videoRotationAngle);
 }
 private void OnDisable()
 {
     QRCodeScanner.StopWebCamera();
 }
 private void OnEnable()
 {
     QRCodeScanner.StartWebCamera();
 }