How to build your project for HoloLens?

  • In the Unity menu, select File > Build Settings... to open the Build Settings window.
Build settings.
  • In the Build Settings window, select Universal Windows Platform and click the Switch Platform button.
Switch platform to Windows Universal Platform.
  • Click on Project Settings in the Build Settings window or the Unity menu, select Edit > Project Settings... to open the Project Settings window.
Project settings.
  • In the Project Settings window, select Player > XR Settings to expand the XR Settings.
Player XR settings.
  • In the XR Settings, check the Virtual Reality Supported checkbox to enable virtual reality, then click the + icon and select Windows Mixed Reality to add the Windows Mixed Reality SDK.
XR settings Mixed Reality Supported checkbox.
Your projects settings might have been configured by Mixed Reality Toolkit.
  • Optimize the XR Settings as follows:
    • Set Windows Mixed Reality Depth Format to 16-bit depth.
    • Check the Windows Mixed Reality Enable Depth Sharing checkbox.
    • Set Stereo Rendering Mode* to Single Pass Instanced.
Optimization settings for XR.
  • In the Project Settings window, select Player > Publishing Settings to expand the Publishing Settings. Scroll down to the Capabilities section and check the SpatialPerception checkbox.
Spatial Perception enabled.
Save your project and open up the Build Settings. Click on Build button, not Build and Run. When prompted, create a new folder(ex:HoloLensBuild) and select your new folder to build your files into.
Click on Build button, not Build and Run.
Build your project into a new folder by clicking build button.
When your build is done, your file explorer will automatically open to the build folder you just created.