Search Unity

Vuforia HoloLens Sample Fails Build

Discussion in 'Vuforia' started by jjscloud, Nov 6, 2017.

  1. jjscloud

    jjscloud

    Joined:
    Oct 24, 2017
    Posts:
    2
    Hi, I am currently trying to test the Vuforia Hololens Sample on the Unity
    Asset store and encounter a weird error when attempting to build the project in Unity. Any help would be greatly appreciated.

    Here is a screen shot of the error in question:
     

    Attached Files:

  2. Vuforia-Strasza

    Vuforia-Strasza

    Official Vuforia Employee Vuforia

    Joined:
    Jun 13, 2017
    Posts:
    548
    Was your Configuration -> Scripting Backend field set to ".NET" when you imported the sample project? This should be set to IL2CPP (screenshot attached). This is the value it is set to when I imported the HoloLens sample into a fresh project. Could you try switching this and let me know if that resolves your issue?

    Thanks!
     

    Attached Files:

  3. jjscloud

    jjscloud

    Joined:
    Oct 24, 2017
    Posts:
    2
    Thanks for the Quick Reply, you are correct that I set the scripting backend field to .Net. The reason for this is that when trying to build the project, Unity alerts that it is missing IL2CPP. I assumed this was a setup error as when building the project with IL2CPP, the solution generated for Visual studio does not run
     
  4. Vuforia-Strasza

    Vuforia-Strasza

    Official Vuforia Employee Vuforia

    Joined:
    Jun 13, 2017
    Posts:
    548
    What does the error in VS say when it does not run?
     
  5. Digitaliss

    Digitaliss

    Joined:
    Nov 6, 2017
    Posts:
    5
    Hello,

    I am working with jjscloud, who has been posting here on my behalf. Thank you for your responses.

    Ok, so this is the error message I get when I set the scripting backend field to IL2CPP (attached below).

    However, I realised that the build using .NET as the scripting backend field does work now that I have actually added Vuforia to the Virtual Reality SDK. (I somehow didn't realize it wasn't added already). So perhaps that problem is resolved now.

    But... we have a new problem.

    Using the above setup (.NET as the scripting backend field), I am able to build a VS solution and deploy it to the Hololens. I am able to see the first two scenes (the Vuforia splash screen and the loading screen). However, when it gets to the second scene, I do not see any of the sprites. I do not know why this is. I even tried moving the AR camera such that, within the Unity preview, I am able to see the sprites.

    Could you lend some insight into this? (Or should I be posting in a new thread for this?)

    Thank you!
     

    Attached Files:

  6. Vuforia-Strasza

    Vuforia-Strasza

    Official Vuforia Employee Vuforia

    Joined:
    Jun 13, 2017
    Posts:
    548
    Hi Digitaliss,

    Can you confirm that this is what your XR Settings look like for your UWP settings?

    What sprites are you unable to see? When you look at a target are you not seeing the Astronaut (and other) model?

    Thanks
     

    Attached Files:

  7. Digitaliss

    Digitaliss

    Joined:
    Nov 6, 2017
    Posts:
    5
    Thank you for your response!

    Ok, so that WAS the XR settings I had when I was having the issue with not being able to build (giving me the errors above-- I have attached a photo showing the XR setting and the related errors).

    However, if I use the .NET backend scripting, and if I click on the + button in the Virtual Reality SDK section, and add Vuforia, then I can get a build.

    This build can be deployed to the Hololens successfully. I can see the Vuforia splash screen and the loading symbol from scenes 0 and 1, but when I get to the scene with the astronaut, drone, oxygen and fissure), I cannot see them in the Hololens. All I see is a blank screen. If I move my head around, I do not encounter any holograms.

    In Unity, I can see these in the preview, but I do not see them in the Hololens.
     

    Attached Files:

  8. Vuforia-Strasza

    Vuforia-Strasza

    Official Vuforia Employee Vuforia

    Joined:
    Jun 13, 2017
    Posts:
    548
    Do you see them when you look at the targets?

    These objects exist in the scene view in Unity, but there are scripts to hide them until their associated target has been detected. Could you try looking at the targets associated with these objects and let me know if they are augmented?
     
  9. Digitaliss

    Digitaliss

    Joined:
    Nov 6, 2017
    Posts:
    5
    Thank you for your response!

    I am uncertain about what you mean about looking at a target. Could you explain what a target is, and how to let the hololens know I am looking at the correct target?

    Thank you!
     
  10. Vuforia-Strasza

    Vuforia-Strasza

    Official Vuforia Employee Vuforia

    Joined:
    Jun 13, 2017
    Posts:
    548
  11. Digitaliss

    Digitaliss

    Joined:
    Nov 6, 2017
    Posts:
    5
    Oh my gosh. I feel like such an idiot. I found the ForPrint folder. Everything makes sense now.

    Thank you so much!!
     
    Vuforia-Strasza likes this.
  12. Digitaliss

    Digitaliss

    Joined:
    Nov 6, 2017
    Posts:
    5
    For posterity, in case someone has the same problem as me:

    In the sample project, in Assets/Editor/Vuforia/ForPrint/ImageTargets you will find the image targets in question. Either print them or display them on your screen to get the Hololens to detect them.
     
    Vuforia-Strasza likes this.
  13. Vuforia-Strasza

    Vuforia-Strasza

    Official Vuforia Employee Vuforia

    Joined:
    Jun 13, 2017
    Posts:
    548
    You're welcome, happy to help :)