1

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?

halfer
  • 19,824
  • 17
  • 99
  • 186
Sam Sundar
  • 61
  • 13
  • Please read [Under what circumstances may I add “urgent” or other similar phrases to my question, in order to obtain faster answers?](//meta.stackoverflow.com/q/326569) - the summary is that this is not an ideal way to address volunteers, and is probably counterproductive to obtaining answers. Please refrain from adding this to your questions. – halfer Oct 10 '18 at 08:49
  • Sorry man , i was very much tensed when this happened . Thats y i had to add those words :) – Sam Sundar Oct 10 '18 at 09:16

1 Answers1

1

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!

Community
  • 1
  • 1
  • The issue I'm facing is , the Image targets ( Markers ) are not being detected when app opened in HoloLens , although the same project in unity play mode detects the image target .. My project is when image target is detected show some canvas images .. – Sam Sundar Oct 15 '18 at 15:13
  • I never used it myself. I understand what you are talking about. I looked at unity documentation. I don't know the answer, but I still think it is the same issue that I had. The problem seems to be that you don't have a direct access to the camera code, so you cannot use my workaround. But from my understanding this is an issue with unity library when using the camera. Similar issue is happening to to **PosterCalibration Camera**: https://github.com/Microsoft/MixedRealityCompanionKit/issues/299 . I am sorry, I don't have a solution for you :( – Mohammed Alshair Oct 15 '18 at 16:57
  • I will recommend that you download earlier version of Unity like Unity 2017.2.4f1. Use Unity Hub to be able to keep both versions installed. If it works, then you are having the same problem and you need to continue using the old version until the issue get resolved by Unity. You can continue upgrading Unity oner version at a time until you get the latest working version. It is painful, but this is the only recommendation that I have. I myself tried it only Unity 2018, but it was working fine in earlier version. Hopefully this help a little. Good Luck! – Mohammed Alshair Oct 15 '18 at 17:01