Unity MR Part 4: Enter MR
Tags: unity3d, mixedreality, tutorial, beginners
Published: 2024-01-11 08:50:48

👀 Stumbled here on accident? Start with the [introduction](https://dev.to/taikonauten/part-0-introduction-56fl)!

📚 In this article, you will learn the setup process for URP (Universal Render Pipeline) and the camera configuration necessary to enable passthrough functionality. This guide will provide step-by-step instructions to ensure that passthrough operates effectively in your project, essential for creating immersive augmented reality experiences.

---

ℹ️ If you find yourself facing any difficulties, remember that you can always refer to or download the code from our accompanying [GitHub repository](https://github.com/taikonauten/unity-mr-article-series/tree/main/04_EnterMR)

---

To activate passthrough in our Android build, adjustments are required for the camera and URP asset. The camera's `Background Type` should be set to solid color, but to enable passthrough, modify the `Background` color's alpha value to 0. This can be done by clicking on the black bar to access the color picker, as demonstrated in the following two screenshots.

ℹ️ `Background`: the Camera clears its color buffer to this color before rendering.


![Camera component in the Environment section](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/62fbymvxb6ktd0rlvkiw.png)
<figcaption>Camera component in the Environment section</figcaption>
---

![Color picker for the Background clear color](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fg51ilt2jhj4yvde13o0.png)
<figcaption>Color picker for the Background clear color</figcaption>
---

Close the color picker, access the Project Settings by navigating to **Edit → Project Settings**, then proceed to the Quality section. You will notice that the Balanced level is set as the standard quality for our Android build.

![Project Settings Quality](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/00okdqtnqjpsjgznw4ao.png)
<figcaption>Project Settings Quality</figcaption>
---

The Balanced URP Asset features an HDR (High Dynamic Range) option that is unsupported and results in passthrough being unavailable. To rectify this, disable HDR in your URP-Balanced asset, located under **Assets/Settings** under `Project`. This adjustment is crucial for ensuring that passthrough functionality is enabled correctly in your project.


![Disable HDR in URP-Balanced](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/04y364lqeli9480u0yhk.png)
<figcaption>Disable HDR in URP-Balanced</figcaption>
---

## Testing the app

That's all for now. We're ready to test our application. From now on we need to build the application and deploy it to the Meta Quest 3 since Passthrough is not available via hitting Play.


![](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sfrlxcf0y80t7s93wo1g.png)
---

Ensure that all configurations are correctly set by navigating to **File → Build Settings**. Once you've verified these settings, simply click on `Build And Run` to proceed.

You should now see the Unity project running in your headset as seen in the next screenshot.

Passthrough is now successfully enabled in our Android build, as evidenced by the recent adjustments. This achievement marks a significant step in ensuring that the application functions with the desired augmented reality capabilities on Android devices.


![Entering MR in our office](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bpl9r5o9u1poxunu9fh8.png)
<figcaption>Entering MR in our office</figcaption>
---

## Next article

In our upcoming article, we will focus on configuring the left and right controllers for the Meta Quest 3. This step is crucial for creating a responsive and intuitive user experience in virtual reality. We'll guide you through the process of setting up these controllers in Unity, discussing how to map their buttons.