コード例 #1
0
 private void SetButtons(bool status)
 {
     if (MobileServer.IsQRCodeExists())
     {
         status = true;
     }
     scanButton.SetActive(!status);
     displayQRButton.SetActive(status);
 }
コード例 #2
0
        private void DrawCamera()
        {
            cameraRenderer.material.mainTexture = camTexture;

            try
            {
                IBarcodeReader barcodeReader = new BarcodeReader();
                var            barcodeResult = barcodeReader.Decode(camTexture.GetPixels32(), camTexture.width, camTexture.height);

                if (barcodeResult != null)
                {
                    MobileServer.SaveQRCode(barcodeResult.Text, new PassengerData()
                    {
                        guid = barcodeResult.Text
                    });
                    Debug.Log($"Decoded from QR: {barcodeResult.Text}");
                }
            }
            catch (ZXing.FormatException e)
            {
                Debug.LogWarning(e.Message);
            }
        }
コード例 #3
0
 private void Awake()
 {
     MobileServer.InitializeDataPath();
 }
コード例 #4
0
 private void SetIsQRCodeDrawing(bool status)
 {
     currentGUID = MobileServer.GetQRCode();
     qrCodeRenderer.gameObject.SetActive(status);
     isDrawReady = status;
 }