Search Unity

Bug Anything I build it always shows as 2D on the actual Hololens 2 ARM64 device

Discussion in 'VR' started by DFT-Games, Jun 26, 2020.

  1. DFT-Games

    DFT-Games

    Joined:
    Jun 24, 2010
    Posts:
    454
    Hey, Unity guys! This is driving me crazy! I started a vanilla project (Unity 2019 LTS), imported all MRTK packages (Tools, Foundation, Extensions and Examples, then I added the new XR plugin management. Here's my setting:


    SO, I then load the famous scene HandInteractionsExamples from the demo scenes and in the Build Window, I hit Build All. Then I deploy on the device and... here's what I get:

    It's a 2D version of what it's supposed to be, and, even more odd, it's like parented to the head, is stuck in front of me and that is what I see moving my head, see here, looking down:


    What is going on here? Any idea? Pointers?
     
  2. DFT-Games

    DFT-Games

    Joined:
    Jun 24, 2010
    Posts:
    454
    I figured this out by myself; now, I hope Unity will fix this. What I was doing is to use the new MR Management plugin and its satellite plugins, which are the official preferred approach. Well, that doesn't work. Rolling back to Windows Mixed Reality plugin solves the problem.

    This can be reproduced at will on Unity 2019 LTS (2019.4.1f1), and reproduces the same behaviour all the times.
     
    Arkonis_Khobalt likes this.
  3. JasonCostanza

    JasonCostanza

    Unity Technologies

    Joined:
    May 23, 2017
    Posts:
    404
    Hi there @DFT-Games

    I understand you're having issues with the new XR Management. I would love to get some more information on your configuration so we can look into it and if possible have you file a bug report with a project that reproduces this behavior. Can you run me through some of the configuration options you have set in your Management tab of your Player Settings and also the Windows Mixed Reality tab under that? Perhaps I can point you to a setting which would cause it to launch as a slate app instead of an immersive one.
     
  4. keveleigh

    keveleigh

    Official Microsoft Employee

    Joined:
    Jun 19, 2015
    Posts:
    35
    JasonCostanza likes this.
  5. ninjanosui

    ninjanosui

    Joined:
    Jul 12, 2013
    Posts:
    54
    Still having this issue even when following the docs. (and it keeps saying development build in the bottom right)
     
  6. ninjanosui

    ninjanosui

    Joined:
    Jul 12, 2013
    Posts:
    54
    The legacy stuff works but then I'm getting the Crash when trying to record a video :
    'No capture devices are available.'
     
  7. JasonCostanza

    JasonCostanza

    Unity Technologies

    Joined:
    May 23, 2017
    Posts:
    404
    Could one or both of you file a new bug with a minimum reproduction project so we can investigate?
     
    ninjanosui likes this.
  8. ninjanosui

    ninjanosui

    Joined:
    Jul 12, 2013
    Posts:
    54
  9. JasonCostanza

    JasonCostanza

    Unity Technologies

    Joined:
    May 23, 2017
    Posts:
    404
  10. JasonCostanza

    JasonCostanza

    Unity Technologies

    Joined:
    May 23, 2017
    Posts:
    404
    Got to look at this sooner than I thought! Can you try enabling the loaders for the platforms you need. Upon opening your project all the loaders were disabled which would explain why it's launching in 2D format

    upload_2020-8-27_12-44-51.png
     
  11. ninjanosui

    ninjanosui

    Joined:
    Jul 12, 2013
    Posts:
    54
    Hi Thank you, When I try to check WMR, it is saying assigning all requested loaders, it installs the packages and then returns unchecked.
     
  12. JasonCostanza

    JasonCostanza

    Unity Technologies

    Joined:
    May 23, 2017
    Posts:
    404
    Can you try to re-install your XR Management? I would delete the entry from your manifest.json and clear the package from your package cache then re-open the project and install XR Management and Windows XR Plugin again and see if that resolves that. The fact there is a Sample Loader showing in your management makes me worried something is wrong with your Management package and may need to be reinstalled.
     
    ninjanosui likes this.
  13. ninjanosui

    ninjanosui

    Joined:
    Jul 12, 2013
    Posts:
    54
    The sample was imported by me in the plugin manager. I reinstalled the XR Plugin Manager as you suggested but without succes. I get the warning :
    XR Plug-in Management Warning: Timeout trying to get package list after 30s.
    UnityEditor.EditorApplication:Internal_CallUpdateFunctions(
     
  14. ninjanosui

    ninjanosui

    Joined:
    Jul 12, 2013
    Posts:
    54
    I get this from the editor log:
    Start importing Assets/MRTK/SDK/Profiles/DefaultMixedRealitySceneSystemProfile.asset using Guid(069efa41032a317409790a6a08435311) Importer(-1,00000000000000000000000000000000)
    Done importing asset: 'Assets/MRTK/SDK/Profiles/DefaultMixedRealitySceneSystemProfile.asset' (target hash: 'c6d01582300a30497c1098dda206880e') in 0.039397 seconds
    Start importing Assets/XR/XRGeneralSettings.asset using Guid(a9d53539e0b5e6e4dbd6ae7c78092d11) Importer(-1,00000000000000000000000000000000)
    Done importing asset: 'Assets/XR/XRGeneralSettings.asset' (target hash: '921eb593cc139b9f481c4ee614eabded') in 0.026727 seconds
    Start importing ProjectSettings/ProjectSettings.asset using Guid(00000000000000004000000000000000) Importer(-1,00000000000000000000000000000000)
    Done importing asset: 'ProjectSettings/ProjectSettings.asset' (target hash: '95f8a15b6db331cfc2c859bcda8f0dbd') in 0.034445 seconds
    Refreshing native plugins compatible for Editor in 0.97 ms, found 7 plugins.
    Preloading 1 native plugins for Editor in 0.10 ms.
    RefreshInfo: StopAssetImportingV2(NoUpdateAssetOptions)
     
  15. JasonCostanza

    JasonCostanza

    Unity Technologies

    Joined:
    May 23, 2017
    Posts:
    404
    Oh I see, I thought the sample was a bug caused by us. If that is something you did I will omit that.

    We have been chasing this bug for a few weeks actually. I may request more info on that but we won't cross the streams here in this thread.

    I'm going to send this thread to my engineer who ironically handles both of these issues and see what info we may need to diagnose this.
     
  16. joejo

    joejo

    Unity Technologies

    Joined:
    May 26, 2016
    Posts:
    958
    @ninjanosui Can you make sure you are running version 3.2.13 of XR Plug-in Management?
     
  17. ninjanosui

    ninjanosui

    Joined:
    Jul 12, 2013
    Posts:
    54
    Hi Joejo, Im running 3.2.13
     
  18. Thomas-Mountainborn

    Thomas-Mountainborn

    Joined:
    Jun 11, 2015
    Posts:
    501
    I'm experiencing the same issue. I'm just starting out with the HoloLens 2, but following the guides to set it up just results in the above issue. I'm on Unity 2020.1. In general, it's starting to get very confusing which XR plugin we're supposed to be using, since Unity keeps changing it. Microsoft's MRTK wants to enable the legacy XR system, but that's no longer visible in the player settings. The XR plugin management package (3.2.13) and the Windows XR Plugin (both 3.3.1 and 4.0.2) result in the issue described in the OP. I'll try reverting to an older Unity version.

    Can we get official word from Unity how to get the HoloLens 2 up and running in modern Unity versions?
     
    Deleted User likes this.
  19. joejo

    joejo

    Unity Technologies

    Joined:
    May 26, 2016
    Posts:
    958
    For MRTK issues and questions, especially in regards to XR SDK support you should ask on the MRTK forums directly. SOmeone there should be able to point you to the exact release that supports XR SDK directly.

    The docs here are failry good in regards to setting up XR SDK: https://docs.unity3d.com/2020.1/Documentation/Manual/configuring-project-for-xr.html

    For debugging purposes, you wan to make sure that you strip the project down to the simplest form that reproduces the bug. In this case we need to start with a new project.

    Getting HL2 up and running on an new, simple project:

    1) Create a new Unity Project
    2) Open ProjectSettings-> XR Plug-in Management and select the Windows Store Application tab.
    3) Select the Windows Mixed Reality provider.
    4) Do whatever you want to setup an initial scene to test with.
    5) Open the Build Window, select WSA as your target build and add your scene to the build.
    6) Build your project to a VS Solution.
    7) Once complete, open the solution in VS. Select Arm64 as your build target.
    8) In the main project, open properties, select Debugging and make sure that the IP address of your HL2 device is added for all your configurations.
    9) Build and Deploy/Debug

    That should be all you need to get your project running on HL2 using XR SDK. If this doesn't work, then there is an issue on device and the only way we can help you further would be for you to provide the player log file generated when you ran your app on device. That should have infomation on what may have gone wrong.

    If this works, then you'll need to figure out what is going on with any external assets or packages you are also trying to use and work with those package owners to see what they suggest or can help with.
     
  20. ninjanosui

    ninjanosui

    Joined:
    Jul 12, 2013
    Posts:
    54
    Where can we find the player log?
     
  21. Arkonis_Khobalt

    Arkonis_Khobalt

    Joined:
    May 11, 2017
    Posts:
    11
    I've been experiencing the same bug lately.
    Originally I was using Unity 2020.1.2f, then I tried to use 2019.4.3f following this thread, then 2019.3.2f following an advice from a coworker, and did not manage to make it work a single time.
    I'm on the latest visual studio, latest windows 10, and tried with both MRTK 2.3 and 2.4 downloaded from Microsoft's github.

    The scene is always rendered as 2D and I'm unable to interact with anything in the scene.
    Even with an empty scene only containing MixedRealityPlayspace, MixedRealtyToolkit and a basic cube.
     
    ryanm798 and Deleted User like this.
  22. Thomas-Mountainborn

    Thomas-Mountainborn

    Joined:
    Jun 11, 2015
    Posts:
    501
    @Arkonis_Khobalt The only working option is using the legacy XR system, available up to 2019.4. You need to uninstall the XR packages, and only have the WMR and XR Legacy Input Helpers packages installed. Then, in the UWP player settings, you can enable WMR under XR settings > VR supported. Important note: the camera background color must be alpha 0, or the application will be run as a 2D window instead of a 3D environment.

    @joejo It doesn't seem like anyone is able to get the XR plugins to do anything but the issue described in the OP.
     
    fredsharples likes this.
  23. Arkonis_Khobalt

    Arkonis_Khobalt

    Joined:
    May 11, 2017
    Posts:
    11
    @Thomas-Mountainborn Thank you very much it finally worked !
    Do you know if there is a way to use HL2's handtracking from MRTK or is it dead in the water until the new XR pipeline gets fixed ?
     
  24. Thomas-Mountainborn

    Thomas-Mountainborn

    Joined:
    Jun 11, 2015
    Posts:
    501
    What exactly is it you want to use from the hand tracking? I can definitely use the hand tracking features such as displayed in the hand tracking sample scene from MRTK.
     
  25. Arkonis_Khobalt

    Arkonis_Khobalt

    Joined:
    May 11, 2017
    Posts:
    11
    Oh perfect then, I just need to grab things and push buttons.
    From what you said I missunderstood that no other SDKs were able to function with this limited and officially deprecated XR-support.
    I'll try to make my [MRTK 2.4 + vuforia] scene work and report any significative findings.
     
  26. joejo

    joejo

    Unity Technologies

    Joined:
    May 26, 2016
    Posts:
    958
  27. Arkonis_Khobalt

    Arkonis_Khobalt

    Joined:
    May 11, 2017
    Posts:
    11
    So to sum eveything up in case it can help someone one day, here's what I had to do to setup XR on Hololens :
    - Maximum working version is unity 2019.4.9. You need to install legacy XR and MIxedRealityToolKit from Unity Package Manager.
    - Use Legacy XR's XRRig (GameObject > XR > Convert Main Camera to XRRig) instead of the MixedRealityPlayspace added by MRTK, and as you said it requires an alpha 0 background.
    - Then you can import MRTK 2.4
    - Add the MixedRealityToolkit manager to the scene (Top bar > MixedRealityToolkit > add to scene and configure) and follow this configuration guide.

    You can now use pointers / spatial awareness / etc.
    (I still have issues while using files from StreamingAssets but it's unrelated to this thread's topic).
     
    Last edited: Sep 4, 2020
  28. re-cheid

    re-cheid

    Joined:
    Apr 10, 2017
    Posts:
    34
    Hey keveleigh,
    Selecting the DefaultXRSDKDefaultConfigurationProfile did indeed solve the lock problem, but things like the HandConstraint for the hand menu do not work with that for some reason.

    //EDIT:
    Subscribing to global input events as described below works fine:
    https://microsoft.github.io/MixedRealityToolkit-Unity/Documentation/Input/InputEvents.html
     
    Last edited: Sep 8, 2020
  29. ninjanosui

    ninjanosui

    Joined:
    Jul 12, 2013
    Posts:
    54
    I managed to solve it by updating unity and creating a clean project.

    Still got the issue:
    "Capture device that is present on the system is not supported by Media Foundation" when trying to record video
     
    Last edited: Sep 9, 2020
  30. keveleigh

    keveleigh

    Official Microsoft Employee

    Joined:
    Jun 19, 2015
    Posts:
    35
    Ah yeah, that was due to a misconfiguration of the profile. It was missing HandJointService. You can either add it manually, or it'll be fixed in the upcoming 2.5.0 release: https://github.com/microsoft/MixedRealityToolkit-Unity/pull/8328
     
    re-cheid likes this.
  31. mhab

    mhab

    Joined:
    Jul 9, 2019
    Posts:
    3
    Figuring out the configurations with HoloLens 2, MRTK 2.4 and XRSDK is a hassle at the moment. What guide or list of steps is working correctly, without headlock and with correct HL2 input?