Hello everyone.

The Mixed Reality Forums here are no longer being used or maintained.

There are a few other places we would like to direct you to for support, both from Microsoft and from the community.

The first way we want to connect with you is our mixed reality developer program, which you can sign up for at https://aka.ms/IWantMR.

For technical questions, please use Stack Overflow, and tag your questions using either hololens or windows-mixed-reality.

If you want to join in discussions, please do so in the HoloDevelopers Slack, which you can join by going to https://aka.ms/holodevelopers, or in our Microsoft Tech Communities forums at https://techcommunity.microsoft.com/t5/mixed-reality/ct-p/MicrosoftMixedReality.

And always feel free to hit us up on Twitter @MxdRealityDev.

Is there a way to run Unity/Visual Studio compiled apps inside the Mixed Reality portal?

edited August 2017 in Q&A and Discussions

Running Unity 2017.1.0f3 and VB 2017.
I'd like to compile a test project and run it in the Mixed Reality Portal.
I have the HP MR headset which works fine with the MR portal.
But compiled unity apps just pop up as a windows program, not in the MR portal.
Unity build settings are set to UWP/hololens/D3D/Local Machine.
Visual Studio is set to master/x86/Local Machine.
Is it possible to compile and run in the MR portal?

Best Answers

  • Accepted Answer

    same with 2017.2b. searched though all the tips I can find and nothing showing how to do this.

  • Accepted Answer

    Ok now I have it working in the mixed reality portal. I had to delete my old unity project and re-create it in Unity 2017.2beta. then when I did 'build and run' it ran correctly in visual stuidio. You have to really pay attention to any console errors and visual studio errors :)

  • Accepted Answer

    solved! I needed to upgrade to Visual Studio 2017-15.3.0 I was at 15.2.
    Now when I select 'build and run' from unity it does a clean compile(except for one minor warning), loads the mixed reality portal, and voila, holocube lives.
    Next I would like to know more about how to run my compiled .exe from outside of unity. I see the .exe but when I select it I get 'cannot proceed because vcruntime140_app.dll was not found'. My guess is this is a path issue since it does compile and run through unity/visual studio.

Answers

  • Accepted Answer

    same with 2017.2b. searched though all the tips I can find and nothing showing how to do this.

  • ok I found it: edit>project settings>player>XR settings>VR Supported. Make sure the Windows SDK is listed below this check box.
    So I can run from Unity, but the Visual Studio compile only loads in outside of the mixed reality portal.
    Any idea how to make it run inside the mixed reality portal?

  • Accepted Answer

    Ok now I have it working in the mixed reality portal. I had to delete my old unity project and re-create it in Unity 2017.2beta. then when I did 'build and run' it ran correctly in visual stuidio. You have to really pay attention to any console errors and visual studio errors :)

  • Glad you got it working @david_broggy

  • Quick note: Sometimes you have to make sure the target device family is set to either Windows.Universal or Windows.Desktop.
    Windows.Holographic is only for HoloLens.

    Inside the appmanifest file.

    Dwight Goins
    CAO & Founder| Independent Architect | Trainer and Consultant | Sr. Enterprise Architect
    MVP | MCT | MCSD | MCPD | SharePoint TS | MS Virtual TS |Windows 8 App Store Developer | Linux Gentoo Geek | Raspberry Pi Owner | Micro .Net Developer | Kinect For Windows Device Developer
    http://dgoins.wordpress.com

  • Accepted Answer

    solved! I needed to upgrade to Visual Studio 2017-15.3.0 I was at 15.2.
    Now when I select 'build and run' from unity it does a clean compile(except for one minor warning), loads the mixed reality portal, and voila, holocube lives.
    Next I would like to know more about how to run my compiled .exe from outside of unity. I see the .exe but when I select it I get 'cannot proceed because vcruntime140_app.dll was not found'. My guess is this is a path issue since it does compile and run through unity/visual studio.

  • I can run holoworld.exe at the command line but not the 'proper' way:
    1. start the mixed reality portal
    2. open powershell(or dos) and go to the path where the .exe is located, eg: ..Documents\holoworld\build\bin\Win32\Master\Appx\
    3. run holoworld.exe
    4. But this seems to be running in the background, so you have to bring it forward by opening Task Manager > App history > right click on holoworld and select 'Switch to'

  • You should not be compiling to exe. The easiest way to get it to run from within Mixed Reality Portal, is from within Unity, do a build. This will create a second Visual Studio Solution in the folder that you specify (often App, but it's really up to you). Once that solution is created, you open it up, set Visual Studio to x86, Release and Local Machine. Then do a deploy solution from the build file menu, and it will deploy to your computer. Then, when you load up Mixed Reality Portal, it should be in your all apps list.

    There are other ways of doing this that involve creating Appx packages and loading them, but they are not easier, at least in my opinion.

  • Brilliant, thanks Jesse, very helpful.
    It works exactly as you clearly described.
    If anyone has more mixed reality references I'm interested in reading them all (aside from the stuff on the Unity site and the microsoft hololens tutorials)
    (Dwight thanks for your help also, I found the AppxManifest.xml, but fortunately I didn't have to change it).

  • There are a couple books that you might be interested in.

    HoloLens Beginners Guide by @subere23

    Beginning Windows Mixed Reality Programming by @mr0ng

    I've read both, know the authors, and own copies of each that I give to my mentees. Both are a good place to get started in this space.

  • Thanks again Jesse.
    What I can see from the Table of Contents, they're more focused on hololens than the microsoft mixed reality set I have(HP), and I suspect they're not updated for unity 2017.x, so I'd have to play a bit to get the scripts to work correctly.
    But the subjects they cover certainly are good getting-started topics.
    My objective it to work more with loading 3-point data(eg. source,target,user) via, say, json and visualizing it.
    If you have any references/examples using data visualization that would be of interest.

  • I know @thebanjomatic has done some stuff with Data Visualization, lets see if Adam comes in and can give you any pointers...

  • Hi Dwight. Thanks for your feedback.
    Can you provide more details? Have you used the new mixed reality headsets?
    Or if you could link me to a simple holoworld project with the appropriate settings that would be helpful. Or any project that uses the so-called mixed reality headsets(hp/acer).
    I'm not finding any reference to the appmanifest file. Excuse my newness.

  • Hi Dwight. Thanks for your feedback.
    Can you provide more details? Have you used the new mixed reality headsets?
    Or if you could link me to a simple holoworld project with the appropriate settings that would be helpful. Or any project that uses the so-called mixed reality headsets(hp/acer).
    I'm not finding any reference to the appmanifest file. Excuse my newness.

  • edited August 2017

    @david_broggy - Are you just looking for a simple app that runs in immersive mode so that you can compare/check out the settings?

Sign In or Register to comment.