public QRTrackerStartResult StartQRTracking() { if (qrTracker == null) { Debug.Log("Creating qr tracker"); qrTracker = new QRTracker(); qrTracker.Added += QrTracker_Added; qrTracker.Updated += QrTracker_Updated; qrTracker.Removed += QrTracker_Removed; } if (!IsTrackerRunning) { StartResult = (qrTracker.Start()); if (StartResult == QRTrackerStartResult.Success) { IsTrackerRunning = true; QRCodesTrackingStateChanged?.Invoke(this, true); } else { Debug.LogWarning("Failed to start qr tracker: " + StartResult.ToString()); } } return(StartResult); }
public void StopQRTracking() { if (IsTrackerRunning) { IsTrackerRunning = false; qrTracker.Stop(); StartResult = QRTrackerStartResult.DeviceNotConnected; } }
public QRTrackerStartResult StartQRTracking() { if (!IsTrackerRunning) { StartResult = (qrTracker.Start()); if (StartResult == QRTrackerStartResult.Success) { IsTrackerRunning = true; } } return(StartResult); }
public void StopQRTracking() { if (IsTrackerRunning) { IsTrackerRunning = false; qrTracker.Stop(); StartResult = QRTrackerStartResult.DeviceNotConnected; QRCodesTrackingStateChanged?.Invoke(this, false); lock (qrCodesList) { qrCodesList.Clear(); } } }