Media Player in Editor

Unity Editor version: 2022.2.3f1 - 2022.2.0b8
ML2 OS version: 1.1.0
MLSDK version: 1.1.3

Hi everyone, I want to know if the MLMediaPlayerBehavior can work inside the unity editor. I would like to display a video over a quad using the ML Player. I tried everything but each time I call MLMediaPlayerBehavior.PrepareMLMediaPlayer() I get this error:

Error: MLMediaPlayerCreate in the Magic Leap API failed. Reason: MLResult_NotImplemented 
UnityEngine.XR.MagicLeap.MLMedia/Player:.ctor (UnityEngine.XR.MagicLeap.MLResult&)
MagicLeap.Core.MLMediaPlayerBehavior:get_MediaPlayer () (at ./Library/PackageCache/com.magicleap.unitysdk@6973bf91e4dd/Runtime/APIs/MediaPlayer/Scripts/MLMediaPlayerBehavior.cs:82)
MagicLeap.Core.MLMediaPlayerBehavior:PrepareMLMediaPlayer () (at ./Library/PackageCache/com.magicleap.unitysdk@6973bf91e4dd/Runtime/APIs/MediaPlayer/Scripts/MLMediaPlayerBehavior.cs:158)
VideoControllerTest:Update () (at Assets/_Test_/Video/VideoControllerTest.cs:20)

Unfortunately, right now I can't access my device to test a build. I want to know if the MLMediaPlayerBehavior can work in the editor or if I'm using it in the wrong way.

For completion, I give you a screenshot of the unity console.

1 Like

Thanks @MatteoFifth, let me check. I'll report back asap.

1 Like

Hi @MatteoFifth, The reason for the error is because MLMediaPlayer is not supported in App Sim - Editor.


@kdowney, Thank for your quick response, i'll try it on the device

1 Like