Suspected Magic Leap 2 Camera and Streaming Conflict?

Hi everyone,

I’m working on a Unity application for Magic Leap 2 that captures frames from the front RGB camera and sends them to a server via HTTP.

However, once I enable Magic Leap Hub’s Streaming, my application seems to stop working as expected, and this occurs when using either a Wi-Fi connection or a USB connection. I suspect either:

  • The front camera is being occupied by the Hub’s Streaming service, or
  • HTTP sending is somehow disabled when Streaming is active.

Another thing I noticed:
In the Magic Leap Hub stream, I can see the real world through the front camera before the Unity app starts. But once the app launches, the scene turns black, and I can only see the controller model — no real-world background anymore.

System info:

  • 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
  • Server OS: Windows 11

I just wanted to check if others have encountered this and if it is a known limitation or expected behavior when using Streaming together with camera access in an OpenXR Unity project.

I really appreciate any help you can provide.

Houze

Hey @yanghouze,

You are correct in your suspicion that the MLHub Streaming service uses the same camera as your Unity app, potentially causing a conflict. If the goal is to make a recording of your app, you may have to collect the frame data and save/export it to a video file format of your choosing within your Unity App.

Regarding the black background in your Unity App, the first thing to check would be to make sure your blend mode is set to additive in the Magic Leap OpenXR Rendering Extension.

Let me know if this helps or if you have anymore questions!

Best,
Corey