> For the complete documentation index, see [llms.txt](https://www.xrdev.app/mixed-reality-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.xrdev.app/mixed-reality-docs/lessons/lesson1/project/how-to-build-your-project-for-hololens.md).

# How to build your project for HoloLens?

* In the Unity menu, select **File** > **Build Settings...** to open the Build Settings window.

![Build settings.](https://1227696974-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LoMjAI1irMPA8c0ezFQ%2Fuploads%2Fgit-blob-b17793721903dfbf43d64374c02c440fa6fd1b0d%2FbuioldSettings.png?alt=media)

* &#x20;In the Build Settings window, select **Universal Windows Platform** and click the **Switch Platform** button.

![Switch platform to Windows Universal Platform.](https://1227696974-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LoMjAI1irMPA8c0ezFQ%2Fuploads%2Fgit-blob-a0fbb98f9c1c0555efd042c87f80de4f020b9e80%2FswitchPlatform.png?alt=media)

* &#x20;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.](https://1227696974-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LoMjAI1irMPA8c0ezFQ%2Fuploads%2Fgit-blob-02b65ddb90dc740ceee37d5a678d6a3af32d3540%2FprojSettings.png?alt=media)

* In the Project Settings window, select **Player** > **XR Settings** to expand the XR Settings.

![ Player XR settings.](https://1227696974-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LoMjAI1irMPA8c0ezFQ%2Fuploads%2Fgit-blob-fdd73a9feb78f9c871e30ec9b2e4a4901db07dc8%2FxrSet.png?alt=media)

* &#x20;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.](https://1227696974-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LoMjAI1irMPA8c0ezFQ%2Fuploads%2Fgit-blob-627ee7a0f5b61e8c8e9e8657bfe7e996b04ea7f6%2FwmrXRsettings.png?alt=media)

{% hint style="info" %}
Your projects settings might have been configured by Mixed Reality Toolkit.
{% endhint %}

* 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.](https://1227696974-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LoMjAI1irMPA8c0ezFQ%2Fuploads%2Fgit-blob-2e845fb55387a40aa54f7dd6e43a23f96e22dfcf%2FxrOptimize.png?alt=media)

* &#x20;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.](https://1227696974-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LoMjAI1irMPA8c0ezFQ%2Fuploads%2Fgit-blob-8f1dfb2a8b8cb8106e5400e60183a2f129168d8f%2FspatialPerception.png?alt=media)

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.

{% hint style="danger" %}
Click on Build button, not Build and Run.
{% endhint %}

![Build your project into a new folder by clicking build button. ](https://1227696974-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LoMjAI1irMPA8c0ezFQ%2Fuploads%2Fgit-blob-e750166a32e07378c4e561a5d69e7897a52e6e0e%2Fbuild.png?alt=media)

When your build is done, your file explorer will automatically open to the build folder you just created.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://www.xrdev.app/mixed-reality-docs/lessons/lesson1/project/how-to-build-your-project-for-hololens.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
