Sam Sundar
Sam Sundar

Reputation: 61

Image Target recognizing in play mode but not in HoloLens

I'm trying to develop an app for HoloLens. The problem I'm facing here now is, when I try to test this app in unity playmode, it's working well and good. But when the same app when deployed to HoloLens, the image targets are not being recognized.

I have enabled my database, Internet and Webcam options in Build settings, Selected virtual reality SDK as windows mixed reality but I don't know what's wrong with this. Is there a fix for this?

Upvotes: 1

Views: 629

Answers (1)

Mohammed Alshair
Mohammed Alshair

Reputation: 280

I am not sure if I understand your question or not. From your post, I making the following assumptions:

  1. To do Image Target, you need to use the camera.
  2. I am assuming you are using UnityEngine.XR.WSA.WebCam.PhotoCapture.
  3. I am assuming you are using Unity 2018 since your post is recent.

If my assumptions are correct

Then there is a bug from Unity side that throws silent exceptions and failing to execute photoCaptureObject.TakePhotoAsync(OnCapturedPhotoToMemory) in the HoloLens. So, OnCapturedPhotoToMemory actually never get called.

Unity Public Issue Tracker:

https://issuetracker.unity3d.com/issues/windowsmr-failure-to-take-photo-capture-in-hololens

Workarounds:

  1. Go to older version of Unity that does NOT have the bug.
  2. Use the following workaround until Unity fixes the bug: https://github.com/MSAlshair/HoloLensMediaCapture

Good Luck!

Upvotes: 1

Related Questions