private void SetButtons(bool status) { if (MobileServer.IsQRCodeExists()) { status = true; } scanButton.SetActive(!status); displayQRButton.SetActive(status); }
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); } }
private void Awake() { MobileServer.InitializeDataPath(); }
private void SetIsQRCodeDrawing(bool status) { currentGUID = MobileServer.GetQRCode(); qrCodeRenderer.gameObject.SetActive(status); isDrawReady = status; }