Hi all!
I'm making video recording functionality for my based on the Unity Magic Leap examples. It works fine, but I can't figure out how to ignore the layer that contains my "Stop recording" button and hint. In a typical mobile project I would, for example, make a second camera render that layer and main camera to ignore that layer. That simply save video from the main camera. But as far as I understand, it's not an option for Magic Leap.
At the same time, the default Magic Leap photo/video capturing functionality that one can trigger from the main menu or by pressing Home button + Bumper shows UI, but doesn't record it. It's the exact functionality I want to achieve in my app.
So could someone tell me how to fix some config (if any exists) or give me a workaround?
Unity Editor version: 2022.3.0
ML2 OS version: 1.3.0-dev1
MLSDK version: 1.11.0 Example project
Host OS: (Windows/MacOS) MacOS
Hello!
You can use the MagicLeap camera apis to capture video from the rgb camera with or without 3d content composed on top of the camera feed.
I recommend taking a look at the camera capture sample in the Unity examples project as it demonstrates how you can capture images from the camera, 3d content, or both-
See \Assets\MagicLeap\Examples\Scenes\CameraCapture.unity
See \Assets\MagicLeap\Examples\Scripts\CameraCapture\CameraCaptureExample.cs for example usage of the MLCamera apis to capture video using various capture modes.
This documentation page lists the different capture modes that are supported by the MLCamera apis-
See documentation pages here for usage of the MLCamera apis-
Briefly, to capture video without 3d content, you will pass ConnectFlag.CamOnly in the Flags field of the MLCamera.ConnectContext struct that you pass to MLCamera.CreateAndConnect.
Best,
Adam
Hello!
Thank you for your answer. I've taken a look at the CameraCapture.unity. But my question remains the same. 3d content that I have is 1) my 3d model 2) my basic UI 3) video recording UI.
Now all 3 are captured when I set ConnectFlag to capture mixed reality. But what I want is ML to capture real world and 1(model) and 2(basic UI) 3d content without 3 - video recording UI.