Hello everyone.

We have decided to phase out the Mixed Reality Forums over the next few months in favor of other ways to connect with us.

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.

The plan between now and the beginning of May is to clean up old, unanswered questions that are no longer relevant. The forums will remain open and usable.

On May 1st we will be locking the forums to new posts and replies. They will remain available for another three months for the purposes of searching them, and then they will be closed altogether on August 1st.

So, where does that leave our awesome community to ask questions? Well, there are a few places we want to engage with you. 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. And always feel free to hit us up on Twitter @MxdRealityDev.

Error in UWP build for Windows Mixed Reality

Lum4DLum4D
edited December 2017 in Q&A and Discussions

We are porting our title to UWP (Universal Windows Platform), this is required to build Windows Mixed Reality titles for the Microsoft Store. I’m a Unity developer and I am not skilled in Visual Studio so I’m unsure how to proceed with the errors I’m getting.

I'm using Unity 2017.2.0p2-MRTP5 and Visual Studio 2017 version 15.5.1.

Building with Unity’s IL2CPP scripting backend with .NET 3.5 scripting runtime and API compatibility level set to .NET 4.6 we are able to build from the unity editor and build in Visual Studio without errors. When the title is launched either from visual studio or the .appx file it will play simple scenes, but when loading any of the main levels of our title we get a black screen in the headset and the system freezes up or Visual Studio crashes. The scene will play without errors in the Unity editor or when built for Windows Standalone with support for HTC Vive or Oculus.

I have been able to stop the app before it fully locks up and got this from the output window.
https://drive.google.com/file/d/1VUhGmH3S6frcDqiX009eCRLT2ZLlRioO/view?usp=sharing

A couple times right before Visual studio has crashed I have seen a message in the output window saying “Out of Memory” so I think it could be a memory leak. When the system froze I got the error message "Cannot Continue Windows cannot continue from this exception." The error was titled "HoloShellApp.exe - EXCEPTION"

I installed the Universal Windows Platform build support in Visual Studio and followed these guides when building the project.
https://unity3d.com/learn/tutorials/topics/scripting/taking-unity-games-universal-windows-platform
https://unity3d.com/partners/microsoft/porting-guides

I was running into the missing API issues before I switched to the IL2CPP scripting backend. With that I am no longer getting these build errors.
https://docs.microsoft.com/en-us/windows/uwp/gaming/missing-dot-net-apis-in-unity-and-uwp

Answers

  • Hi @Lum4D
    There will be problems due to the fact you have not loaded the MixedRealityToolkit for Unity 2017.2
    First of all load your game as a new project into Unity 2017.2.0p1 MRTP5

    Export the game complete as a "Game.Unitypackage" from Unity Assests menu function
    Start a new version of Unity Create a new project GameUWP
    Import the MR Toolkit as described in MixedRealityToolkit - Getting Started

    Now import your "Game.Unitypackage"

    Each setup option is described below
    Mixed Reality Toolkit -> Configure -> Apply Mixed Reality Project Settings

    For Immersive headsets, check the Target Occluded Devices option
    Enable Xbox Controller Support option or you may get errors later on

    Mixed Reality Toolkit -> Configure -> Apply Mixed Reality Scene Settings
    Untick "Move Camera Origin" before Apply. You will end up 5 miles away on a beach!, if you forget to do this.

    Follow the instructions for building with the Immersive Windows Mixed Reality Headsets.
    Start the Mixed Reality Portal and put on your WMR Headset, make sure the Cliff room is showing.
    In Unity Editor
    Click Maximize size on play.
    Press Play
    In the headset the screen clears and you are in your game.

    Come out of your game.
    Read the MixedRealityToolkit - Getting Started
    - Section 5 Building your project
    Then build the Unity MRTK project and deploy

    6.1 Deploying your Immersive app using Visual Studio
    Navigate to the Build Window: Mixed Reality Toolkit -> Build Window.
    Press Open Project Solution to open the project in Visual Studio.
    Select x64 in your build configuration options.
    In the debug toolbar, select "Local Machine" as the target. (or remote device if you are pushing to another machine)
    Run the app by hitting play.

Sign In or Register to comment.