Hi all,
I’m encountering an issue with UI masking on Magic Leap 2 when using VideoKit. Here are the details:
Environment:
-
Unity Editor: 2022.3.22f1
-
Magic Leap Hub: Magic Leap Hub 3
-
Magic Leap 2 OS: 1.12.0
-
Magic Leap SDK (OpenXR): 1.12.0
Setup:
I have a prefab consisting of a Canvas
(set to Screen Space - Overlay) with an Image
component that uses a custom transparent material (for simulating visual impairments, e.g. central vision loss). The masking logic is handled via shader and works correctly without VideoKit.
Issue:
When I enable VideoKit (to record the camera output), the UI mask (i.e., the transparent Image) disappears from view. However, other UI elements remain visible — especially a World Space Canvas
(placed in the scene, not from prefab) which renders fine. So the issue only seems to affect Screen Space - Overlay UI with custom transparent shaders.
Things I’ve confirmed:
-
The prefab is instantiated correctly.
-
The custom shader works fine when VideoKit is not recording.
-
The issue does not happen for world-space UI or UIs without transparent materials.
-
There’s no error or warning in the console.
Has anyone experienced this? Is there a known incompatibility between Screen Space - Overlay canvases and VideoKit on Magic Leap 2?
Any suggestions on how to keep the overlay-based masking UI visible while using VideoKit would be greatly appreciated.
Thanks!