public void ScanForQRCode() { ObjectHelper.SetObjectsActive(ShowOnError, false); ObjectHelper.SetObjectsActive(ShowOnSuccess, false); m_scannedToken = null; if (!m_UIWebCamPreview) { Debug.LogError("No Raw Image set."); return; } QRTokenScanner.Instance.Scan(m_UIWebCamPreview, OnQRCodeAuthResponse); }
public void OnQRCodeAuthResponse(bool success, QRTokenSpaceModel qrTokModel) { ThreadHelper.Instance.CallOnMainThread(() => { if (success) { m_scannedToken = qrTokModel; ObjectHelper.SetObjectsActive(ShowOnSuccess, true); } else { ObjectHelper.SetObjectsActive(ShowOnError, true); } }); }