Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please update to Digital Eyewear Sample (Unity) to work with Magic Leap SDK >= 2.3.0 #154

Open
thorbjorgp93 opened this issue Sep 11, 2024 · 10 comments
Labels
feature-feedback Feature feedback

Comments

@thorbjorgp93
Copy link

Summarize your feature feedback
Hi, I am currently working on a model target application running on Magic Leap 2 and am using the Digital Eyewear Sample from the Unity Asset Store. It is working all right but there are some features in newer releases of the Magic Leap SDK that I would like to use but whenever I update the SDK version the sample does no longer work.

Describe your feature
Digital Eyewear sample to be updated to use Magic Leap SDK >= 2.3.0,

Use-case description
There are new features within the magic leap SDK that I (and other people based on the magic leap forums) would like to take advantage of but the sample does not seem to work with an updated version of the SDK.

Business impact
We are currently developing a MR application to showcase Vuforia's ability to track objects using the model target feature in hope of getting clients to buy services and Vuforia.

Workaround
No.

Many thanks!!!

@thorbjorgp93 thorbjorgp93 added the feature-feedback Feature feedback label Sep 11, 2024
@ptc-thesbyro
Copy link
Collaborator

Hi,

Thanks for reaching out.

We regularly evaluate newer platform versions and SDKs but generally prioritize stable versions. That said, I will let the team know there's interest in upgrading the minimum supported Magic Leap SDK.

Now, I'm curious. Could you let me know which features you're looking to use?

Also, could you share more information on what errors you're getting when upgrading the Magic Leap SDK in the Digital Eyewear sample? It may be we can find a workaround.

Thanks,

@thorbjorgp93
Copy link
Author

Hi,
Many thanks for your quick reply.

I understand the importance of working with stable versions but there has been quite a lot of updates on the Magic Leap side (migrating namespaces over to align with OpenXR and additional bug fixes and features) so I think lot of developers are struggling with wanting to use these features but not being able to update the SDK to work with the Vuforia example.

The feature I'm looking at is the Secondary View feature which fixes the misalignment of the virtual content when the headset experience is recorded or streamed. So using Image Targets for example, during the user's experience in the headset the overlaid content aligns perfectly on top of the Image Target but in the video capture, or streaming, the virtual content is displayed at an offset. As we want to be able to stream the user's experience this is not optimal. I saw another developer wanting to use the Pixel Sensor feature.

I will create a new project with the Magic Leap SDK 2.3.0 and share information on the errors soon.

Many thanks,

@thorbjorgp93
Copy link
Author

These are the errors I get when trying to update the Magic Leap SDK to 2.3.0:
image

@ptc-epassaro
Copy link
Collaborator

Hi @thorbjorgp93, to update the MagicLeap SDK package in the Digital Eyewear sample, you also need to update the MagicLeap MRTK3 package that you can find at the bottom of the list in the Package Manager of the Magic Leap Hub.

Screenshot 2024-09-13 at 10 52 24

This combination of versions works for me:

  • Magic Leap SDK 2.4.0
  • Magic Leap MRTK3 1.2.0

After that, I would recommend you to check that all the MagicLeap and OpenXR settings are configured as specified in the documentation. Additionally, it is also recommended to fix any potential error in ProjectSettings > XR Plug-in Management > Project Validation.

You might still see a compilation error or warning in your project coming from the XRSettingsValidation.cs script in SampleResources/Scripts/Editor. If that's the case, you can change line 22 in the script from:

using UnityEngine.XR.OpenXR.Features.MagicLeapSupport;

to:

using MagicLeap.OpenXR.InteractionProfiles;

Hope this helps! In the meantime, we will look into updating the sample in a future release of Vuforia.
Thank you for your feedback!

@thorbjorgp93
Copy link
Author

Hi,
Many thanks for your answer, I think this has worked!!
The only warning I am getting now is:
image

Do you know whether this is acceptable warning or is there a fix for this?

Best,
Thorbjorg

@ptc-epassaro
Copy link
Collaborator

Hi @thorbjorgp93, glad to hear it worked! The warning seems to come from the Magic Leap packages, so I think the only possible thing to do is to ignore it.

If you deploy the sample on device, please let us know how it goes and if everything works as expected.

Thank you,
Ettore

@thorbjorgp93
Copy link
Author

Hi, yes I'll let you know how it goes once I deploy it on the device!

One other thing, are you able to confirm which subsystems are required for the sample, I'm trying to reduce it to only what's needed:
image

Thanks,
Thorbjorg :)

@ptc-epassaro
Copy link
Collaborator

Hi @thorbjorgp93, we configured the sample using the default settings by MagicLeap to simplify the setup and the documentation, so I don't have a list of what is strictly necessary for the sample at the moment.
That said, I am pretty sure that you need the Magic Leap 2 Support, Rendering Extension, Spatial Anchor Subsystem and Spatial Anchors Storage, but don't know much about the others.
If you experiment with those, we would greatly appreciate if you could share your results with us :)

@thorbjorgp93
Copy link
Author

Hi @ptc-epassaro
I can confirm the sample works on Magic Leap 2 (OS 1.8.0) with Magic Leap SDK 2.4.0 and OpenXR subsystems:

  • Magic Leap 2 Eye Tracker
  • Magic Leap 2 Reference Spaces
  • Magic Leap 2 Rendering Extensions
  • Magic Leap 2 Spatial Anchor Subsystem
  • Magic Leap 2 Spatial Anchors Storage
  • Magic Leap 2 Support
  • Magic Leap 2 System Notification Control

Steps to upgrade sample:

  • Create new Unity project with the 3D (Built-In Render Pipeline)
  • Setup project using the Magic Leap Setup Tool
  • Import Vuforia Digital Eyewear Sample project
  • Update Magic Leap SDK to 2.4.0
  • In XRSettingsValidation.cs script in SampleResources/Scripts/Editor, change line 22 in the script from:
    using UnityEngine.XR.OpenXR.Features.MagicLeapSupport;
    to:
    using MagicLeap.OpenXR.InteractionProfiles;
  • Enable the OpenXR subsystems listed above.

@ptc-epassaro
Copy link
Collaborator

ptc-epassaro commented Sep 18, 2024

Hi @thorbjorgp93, thanks for the awesome summary!
We will definitely discuss either adding this to our documentation or update the sample directly in an upcoming release and update this ticket once a decision has been made.

Thank you again!

EDIT: just to be clear, there's one step missing: after updating the Magic Leap SDK to 2.4.0, also update the Magic Leap MRTK3 package to 1.2.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-feedback Feature feedback
Projects
None yet
Development

No branches or pull requests

3 participants