# UI Is Not Transparent

**URL:** <https://forum.magicleap.cloud/t/ui-is-not-transparent/3578>\
**Category:** Unity Development\
**Tags:** segmented-dimming\
**Created:** [May 28, 2024, 7:22pm UTC](https://forum.magicleap.cloud/t/ui-is-not-transparent/3578 "2024-05-28T19:22:58Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![ewokthegreat](https://avatars.discourse-cdn.com/v4/letter/e/977dab/32.png) [@ewokthegreat](https://forum.magicleap.cloud/u/ewokthegreat)\
**Post date:** [May 28, 2024, 7:22pm UTC](https://forum.magicleap.cloud/t/ui-is-not-transparent/3578/1 "2024-05-28T19:22:58Z")

</div>

**Unity Editor version** : 2022.3.27f1  
**ML2 OS version** : 1.7.0  
**Unity SDK version** : 2.2.0  
**Host OS** : Windows 11

When I build the Unity examples project to the device, everything works as expected and the UI is transparent.

I've created a simple project containing just a primitive cube and I duplicated the settings and XR-Rig from the Unity examples project but when I build to the same device, the background is opaque.

Changing the Global Dimmer and Segmented Dimmer settings have no effect on this.

I've also included the script in this article:  
[https://developer-docs.magicleap.cloud/docs/guides/unity-openxr/rendering-extensions/global-dimmer/global-dimmer-example/#](https://developer-docs.magicleap.cloud/docs/guides/unity-openxr/rendering-extensions/global-dimmer/global-dimmer-example/#)

... and it doesn't seem to function at all.

Any suggestions?

---

<div class="post-metadata">

**Author:** ![kbabilinski](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.magicleap.cloud/kbabilinski/32/19_2.png) [@kbabilinski](https://forum.magicleap.cloud/u/kbabilinski)\
**Post date:** [May 28, 2024, 7:52pm UTC](https://forum.magicleap.cloud/t/ui-is-not-transparent/3578/2 "2024-05-28T19:52:10Z")

</div>

Have you looked into disabling the segmented dimmer in the OpenXR Magic Leap Render Extensions?

> **[Segmented Dimming | MagicLeap Developer Documentation](https://developer-docs.magicleap.cloud/docs/guides/unity-openxr/rendering-extensions/segmented-dimming/)**
>
> The Magic Leap 2 is a powerful augmented reality (AR) device capable of enhancing user experiences through various features, including Dynamic Dimming. This technology uses the Alpha buffer to automatically generate a dimmer mask, making the content...

Do you mind verifying the post processing and HDR is disabled inside your project's Graphic Settings?

Are you using URP for your new project?

---

<div class="post-metadata">

**Author:** ![ewokthegreat](https://avatars.discourse-cdn.com/v4/letter/e/977dab/32.png) [@ewokthegreat](https://forum.magicleap.cloud/u/ewokthegreat)\
**Post date:** [May 28, 2024, 8:40pm UTC](https://forum.magicleap.cloud/t/ui-is-not-transparent/3578/3 "2024-05-28T20:40:48Z")

</div>

Hi @kbabilinski and thank you for getting back to me so quickly!

We are using URP in this project. I have verified that post processing and HDR are disabled. For the record, post processing is NOT disabled in the Unity examples project and everything works as expected.

Disabling segmented dimming in the device settings sort of fixes the issue but I suspect there's something else going on. When I record a video of myself using the Unity examples project, it records the room that I'm in. When I do the same with my simple project, the room is not recorded and the environment is completely black with just the cube and the line renderer/pointer.

---

<div class="post-metadata">

**Author:** ![kbabilinski](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.magicleap.cloud/kbabilinski/32/19_2.png) [@kbabilinski](https://forum.magicleap.cloud/u/kbabilinski)\
**Post date:** [May 28, 2024, 8:56pm UTC](https://forum.magicleap.cloud/t/ui-is-not-transparent/3578/4 "2024-05-28T20:56:20Z")

</div>

The issue you are seeing is that an effect or graphics setting is clearing the frame's alpha value. Unity is aware of this issue and is looking at adding support for handling alpha in post-processing in the future.

* * *

Are you using the XR Rig imported from the Magic Leap SDK Sample Inputs & Rig?

---

<div class="post-metadata">

**Author:** ![ewokthegreat](https://avatars.discourse-cdn.com/v4/letter/e/977dab/32.png) [@ewokthegreat](https://forum.magicleap.cloud/u/ewokthegreat)\
**Post date:** [May 28, 2024, 9:02pm UTC](https://forum.magicleap.cloud/t/ui-is-not-transparent/3578/5 "2024-05-28T21:02:53Z")

</div>

I'm using the ML Rig from the Magic Leap Unity (OpenXR) Examples project.

[https://developer-docs.magicleap.cloud/docs/guides/unity-openxr/openxr-unity-samples/](https://developer-docs.magicleap.cloud/docs/guides/unity-openxr/openxr-unity-samples/)

---

<div class="post-metadata">

**Author:** ![kbabilinski](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.magicleap.cloud/kbabilinski/32/19_2.png) [@kbabilinski](https://forum.magicleap.cloud/u/kbabilinski)\
**Post date:** [May 28, 2024, 9:05pm UTC](https://forum.magicleap.cloud/t/ui-is-not-transparent/3578/6 "2024-05-28T21:05:25Z")

</div>

Thank you for that information. Do you mind copying over the URP render pipeline from the Unity Example project?

---

<div class="post-metadata">

**Author:** ![ewokthegreat](https://avatars.discourse-cdn.com/v4/letter/e/977dab/32.png) [@ewokthegreat](https://forum.magicleap.cloud/u/ewokthegreat)\
**Post date:** [May 28, 2024, 9:09pm UTC](https://forum.magicleap.cloud/t/ui-is-not-transparent/3578/7 "2024-05-28T21:09:06Z")

</div>

I have taken that step already and the results are the same. I think I've done most everything to make my project identical to the Examples project; though I'm sure there's something I missed. 🤔

---

<div class="post-metadata">

**Author:** ![kbabilinski](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.magicleap.cloud/kbabilinski/32/19_2.png) [@kbabilinski](https://forum.magicleap.cloud/u/kbabilinski)\
**Post date:** [May 28, 2024, 9:10pm UTC](https://forum.magicleap.cloud/t/ui-is-not-transparent/3578/8 "2024-05-28T21:10:40Z")

</div>

You may want to do a diff of the two projects and see what is different about them.

Have you verified that the correct pipeline is selected in the Graphics settings and across all of the quality settings?

 ![image](https://us1.discourse-cdn.com/flex019/uploads/magicleap1/original/2X/d/de4c2e141c8fa62d8288b2e36ebe3c4eabff482d.png)  
 ![image](https://us1.discourse-cdn.com/flex019/uploads/magicleap1/original/2X/b/b01d1a01b7419cd69681fa762b4109a7ab852619.png)

---

<div class="post-metadata">

**Author:** ![ewokthegreat](https://avatars.discourse-cdn.com/v4/letter/e/977dab/32.png) [@ewokthegreat](https://forum.magicleap.cloud/u/ewokthegreat)\
**Post date:** [June 5, 2024, 1:19pm UTC](https://forum.magicleap.cloud/t/ui-is-not-transparent/3578/9 "2024-06-05T13:19:05Z")

</div>

I never did figure out what was wrong. We decided just to use the Examples Project and copy our scripts over from there.

Thank you for the thorough responses!

---

<div class="post-metadata">

**Author:** ![kbabilinski](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.magicleap.cloud/kbabilinski/32/19_2.png) [@kbabilinski](https://forum.magicleap.cloud/u/kbabilinski)\
**Post date:** [June 6, 2024, 12:00pm UTC](https://forum.magicleap.cloud/t/ui-is-not-transparent/3578/10 "2024-06-06T12:00:13Z")

</div>

This topic was automatically closed after 17 hours. New replies are no longer allowed.
