protected void Start() { if (_qrCodesManager == null) { _qrCodesManager = QRCodesManager.FindOrCreateQRCodesManager(gameObject); _qrCodesManager.QRCodeAdded += QRCodeAdded; _qrCodesManager.QRCodeRemoved += QRCodeRemoved; _qrCodesManager.QRCodeUpdated += QRCodeUpdated; } StartTracking(); }
protected async void OnEnable() { if (_qrCodesManager == null) { _qrCodesManager = QRCodesManager.FindOrCreateQRCodesManager(gameObject); _qrCodesManager.DebugLogging = debugLogging; } if (_qrCodesManager != null) { _qrCodesManager.QRCodeAdded += QRCodeAdded; _qrCodesManager.QRCodeRemoved += QRCodeRemoved; _qrCodesManager.QRCodeUpdated += QRCodeUpdated; await StartTrackingAsync(); } }