chgatla-microsoft / QRTracking

MRTK sample app for QRtracking
MIT License
75 stars 69 forks source link

Restarting QRTracking doesn't work as expected #10

Closed olcsa closed 4 years ago

olcsa commented 4 years ago

Unity version: 2019.2.17f1 Target: HL2 ARM64 QR NuGet version: 0.5.2092

I'm using the same Unity scripts (QRCodesManager, QRCodesVisualizer, etc.). On start, the QRCodesManager will call SetupQRTracking(). I manually call StartQRTracking(), tracking starts, everything works fine. Then i call StopQRTracking() (which works fine too, QRs disapper).

And when i call the StartQRTracking() again nothing happens, it will fire the EnumerationCompleted event, but not the Added, Removed or Updated events, even i'm looking at the previously found QR codes.

My workaround is calling the SetupQRTracking everytime before i call the StartQRTracking. This works fine but i'm not sure if it's the right behaviour, because it will create new QRCodeWatcher on every SetupQRTracking. Can i get an explanation on the correct behaviour? Let me know if you need more info.

dnlwbr commented 4 years ago

Any news on that? @olcsa How did you call SetupQRTracking from outside the script?

olcsa commented 4 years ago

You can create a public method which calls SetupQRTracking and StartQRTracking too.

chgatla-microsoft commented 4 years ago

This should have resolved in latest QR SDK. There was a bug in the QR SDK plugin.