madhawap / HLQRTracking

MIT License
6 stars 2 forks source link

Works with Holographic Remoting but not when installed on HoloLens2 #1

Open timdemand opened 6 months ago

timdemand commented 6 months ago

Hi, I tried this sample project and it would be very kind if you could help me with an error that I am currently stuck with. The problem is as follows: If I run my application using holographic remoting from unity, QR Codes are detected and the Text is displayed, however if I build the application and upload it to the HoloLens, no QR code is detected at all. You wrote in your article that this should work both ways, so maybe you have some information how I could resolve this...

Thank you! Tim

Conmmander commented 1 month ago

Hey timdemand,

Curious to see what specifically isn't working when you build in Unity. Is MRTK3 itself working on build, or when you say "it doesn't work", what's not working.

I've had a few issues with MRTK3 in Unity, specifically:

In both the aforementioned cases, I've gotten applications to work in Holographic Remoting but not on a physical build. I followed this tutorial to get an initial start to QR Reading on HL2 working, and have since rewritten significant parts of it. I'll check tomorrow to see if a build works and let you know, but in the mean time some more information would be awesome!

xmyykj commented 1 month ago

It's very strange. When I generate an installable program and install it on the HoloLens 2, it works fine and recognizes QR codes. However, when I run it in the Unity editor and connect to the HoloLens 2 via the remote player, it does not recognize the QR codes. Can you tell me what the reasons might be?

Conmmander commented 1 month ago

@xmyykj and @timdemand I've not been able to reproduce either case.

On HoloLens 2 I can successfully get a build to track QR Codes. Verify that you've correctly enabled the Webcam permission in Unity, as I suspect that could be an issue with build and running on HL2. As for why it wouldn't work via the remote player, it's possible that there's some strange remoting magic going on there. For instance, if you attempt to access HL2's camera in a certain way, it'll actually pull in a webcam feed instead on your PC that's running Unity. Building that out to a project would use HL2's camera though. I can't imagine that's what is going on, but you never know.