ML2 Unity WebRTC Sample

Hi,

where I can find the Unity WebRTC sample for Magic Leap 2? I had it previously, but cannot find it or the URL.

Andrew

1 Like

@Andrew , the Unity examples can be downloaded via The Lab 2.0, in the Package Manager, under the "All" tab, then Unity Packages > Unity Examples. They are downloaded to your ~/home/MagicLeap/tools/ directory.

1 Like

I didn't realize it was in there. I new to working in Unity, so this could be something really simple.

Here is what I have installed from The Lab 2.0

I have Unity Editor 2022.2.0a14.2907 installed, and when I open the samples, I am getting script compilation errors.

I have added the MLSDK package
MLSDKPackageInstalled

From 2. Import Unity Tools | MagicLeap Developer Documentation, it mentions com.unity.xr.magicleap.zip, which I do not have.

Here are some of the errors:
Packages\com.magicleap.unitysdk\Subsystems\Gesture\Extensions\TouchpadGestureEvent.cs(17,22):
error CS0234: The type or namespace name 'InteractionSubsystems' does not exist in the namespace 'UnityEngine.XR' (are you missing an assembly reference?)
Packages\com.magicleap.unitysdk\Subsystems\Gesture\GestureSubsystem.cs(20,22):
error CS0234: The type or namespace name 'InteractionSubsystems' does not exist in the namespace 'UnityEngine.XR' (are you missing an assembly reference?)
Packages\com.magicleap.unitysdk\Subsystems\Gesture\GestureSubsystemComponent.cs(17,22):
error CS0234: The type or namespace name 'InteractionSubsystems' does not exist in the namespace 'UnityEngine.XR' (are you missing an assembly reference?)
Packages\com.magicleap.unitysdk\Subsystems\ImageTracking\ImageTrackingSubsystem.cs(12,32):
error CS0234: The type or namespace name 'Internal' does not exist in the namespace 'UnityEngine.XR.MagicLeap' (are you missing an assembly reference?)

Andrew

1 Like

We will be releasing an updated SDK likely today that will have the public-facing Unity and XR packages. If you do not have an email with instructions on downloading this XR package, we would recommend waiting and downloading the new SDK files via The Lab.

1 Like

I do not recall receiving one, but there's an SDK update coming? that's great. I will keep an eye out for it.

1 Like

@Andrew check your direct messages for information on continuing.

1 Like

@sengelman, it seems I'm still having a bit of trouble. I uninstalled my editor and reinstalled using the Editor from the link you provided. In case it matters, I copy ~\MagicLeap\tools\unity\v0.53.1\MagicLeap_Examples to a new location before I open it in Unity.

Under Preferences->External Tools, I set the MLSDK path to: ~MagicLeap\mlsdk\v0.53.1

Trying to resolve some script errors, I imported the com.unity.xr.magicleap package, but then warns of duplicates between it and another, so I removed it.

Without it, I'm seeing errors about missing types/namespaces, which include URP, UnityEngine.XR.MagicLeap.Internal, UnityEngine.XR.InteractionSubsystems, etc.

Here are the console messages I'm seeing
ScriptErrors.txt (10.2 KB)

Also, I noticed a WebRTC folder under examples, which is a simple webpage. Will be helpful, but I'm under the impression there's a Unity WebRTC sample: like the one for ML1

Andrew

1 Like

You should install the editor using the link for Unity Hub, not the Download Assistant.

Please start a new project from scratch using these instructions:

Getting Started

1 Like

There we go. I saw that page before, but this time around my eyes didn't glaze over. there were numerous things I didn't get to. Made a few assumptions, I think.

Will I have to do this for the Unity samples? It wouldn't hurt to check, I suppose.

I have deployed a unity app to the device, so things are looking up.
Thanks for the help.

1 Like

I would recommend performing these steps, and dropping everything from Assets in the Unity Examples project into your from-scratch project.

1 Like

(Don't mind me. Just saying hi to Shane! Hope you're doing well) -it's Devon🙂

2 Likes

Ok, I have an actual/serious ML2 question. (Apologies I’m still getting reacquainted with this forum’s format) Sending out it tomorrow! It is relevant to this thread though🙌

1 Like