Coder Social home page Coder Social logo

magicleapunitysdk's Introduction

Magic Leap Unity SDK

This is the official Magic Leap Unity SDK, which exposes the full Magic Leap device capabilities within the Unity engine.

Scoped Registry URL: http://registry.npmjs.org

Scope: com.magicleap

This SDK is provided in the form of an npm-style Unity Package. Therefore, integration into your Unity project is as easy as adding our scoped registry to your project settings and using the Unity Package Manager to install. After installation, upgrades and dependencies can also be managed via the Unity Package Manager.

For a full list of features and documentation on how to use the Magic Leap Unity SDK, see this page on the Magic Leap Developer Portal.

Examples can be found at our Example Project page.

Note : If this package depends on unreleased versions of the Magic Leap XR Plugin (com.unity.xr.magicleap), that plugin will need to be added to the project manually.

Note : Preview builds will not be uploaded on npm. The package will need to either be embedded in the project, or linked locally using the download path.

magicleapunitysdk's People

Contributors

bsawyer-ml avatar kgrinberg-ml avatar madeinph1la avatar nihav-jain avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

magicleapunitysdk's Issues

MLMeshingNativeBindings fails to resolve ToUnity references

After resolving the unsafe code flag in #4 I ran into the next problem:

MLMeshingNativeBindings fails to properly convert the vertex data using the appropriate ToUnity methods.

-----CompilerOutput:-stdout--exitcode: 1--compilationhadfailure: True--outfile: Temp/LuminUnity.dll
Microsoft (R) Visual C# Compiler version 2.9.1.65535 (9d34608e)
Copyright (C) Microsoft Corporation. All rights reserved.

Assets\MagicLeap\Lumin\Bindings\MLMeshingNativeBindings.cs(499,95): error CS1503: Argument 1: cannot convert from 'UnityEngine.Vector3' to 'float'
Assets\MagicLeap\Lumin\Bindings\MLMeshingNativeBindings.cs(499,136): error CS1503: Argument 1: cannot convert from 'UnityEngine.Vector3' to 'float'
Assets\MagicLeap\Lumin\Bindings\MLMeshingNativeBindings.cs(516,69): error CS1503: Argument 1: cannot convert from 'UnityEngine.Vector3' to 'float'
-----CompilerOutput:-stderr----------

image

Missing package manifest causes missing references

When cloning this project I encountered missing reference exceptions bc the project's package manifest is missing from source control.

-----CompilerOutput:-stdout--exitcode: 1--compilationhadfailure: True--outfile: Temp/LuminUnity.dll
Microsoft (R) Visual C# Compiler version 2.9.1.65535 (9d34608e)
Copyright (C) Microsoft Corporation. All rights reserved.

Assets\MagicLeap\Lumin\APIs\HandTracking\MLHandTrackingKeyPoseManager.cs(19,26): error CS0234: The type or namespace name 'InteractionSubsystems' does not exist in the namespace 'UnityEngine.XR' (are you missing an assembly reference?)
Assets\MagicLeap\Lumin\APIs\Input\MLInputController.cs(16,26): error CS0234: The type or namespace name 'InteractionSubsystems' does not exist in the namespace 'UnityEngine.XR' (are you missing an assembly reference?)
Assets\MagicLeap\Lumin\APIs\HandTracking\MLHandTrackingKeyPoseManager.cs(280,49): error CS0246: The type or namespace name 'MagicLeapKeyPoseGestureEvent' could not be found (are you missing a using directive or an assembly reference?)
Assets\MagicLeap\Lumin\APIs\MLAPISingleton.cs(34,17): error CS0246: The type or namespace name 'PerceptionHandle' could not be found (are you missing a using directive or an assembly reference?)
Assets\MagicLeap\Lumin\Utils\MLDevice.cs(27,41): error CS0234: The type or namespace name 'SpatialTracking' does not exist in the namespace 'UnityEngine' (are you missing an assembly reference?)
Assets\MagicLeap\Lumin\APIs\Input\MLInputController.cs(911,57): error CS0246: The type or namespace name 'MagicLeapTouchpadGestureEvent' could not be found (are you missing a using directive or an assembly reference?)
Assets\MagicLeap\Lumin\APIs\Input\MLInputControllerTouchpadGesture.cs(276,61): error CS0234: The type or namespace name 'MagicLeapTouchpadGestureEvent' does not exist in the namespace 'UnityEngine.XR.MagicLeap' (are you missing an assembly reference?)
Assets\MagicLeap\Lumin\Utils\MLDevice.cs(146,23): error CS0246: The type or namespace name 'MagicLeapGestures' could not be found (are you missing a using directive or an assembly reference?)
Assets\MagicLeap\Lumin\Utils\MLDevice.cs(318,33): error CS0115: 'MLDevice.Awake()': no suitable method found to override
Assets\MagicLeap\Lumin\Utils\MLDevice.cs(329,33): error CS0115: 'MLDevice.OnEnable()': no suitable method found to override
Assets\MagicLeap\Lumin\Utils\MLDevice.cs(338,33): error CS0115: 'MLDevice.OnDisable()': no suitable method found to override
Assets\MagicLeap\Lumin\Utils\MLDevice.cs(347,33): error CS0115: 'MLDevice.OnDestroy()': no suitable method found to override
Assets\MagicLeap\Lumin\Utils\MLDevice.cs(358,33): error CS0115: 'MLDevice.Update()': no suitable method found to override
Assets\MagicLeap\Lumin\Utils\MLDevice.cs(62,17): error CS0246: The type or namespace name 'MagicLeapGestures' could not be found (are you missing a using directive or an assembly reference?)
-----CompilerOutput:-stderr----------

image

Found object examples from MagicLeapUnitySDK repo

I cant run the example scene and i get the same from ArucoTracker example.

Unity 2020.2.2f1
Magic Leap SX Plugin 6.2.2

ERROR:
NullReferenceException: Object reference not set to an instance of an object
MagicLeap.Core.MLFoundObjectsBehavior.Update () (at Assets/MagicLeap/Core/Scripts/MLFoundObjectsBehavior.cs:73)

I am able to play other examples without errors.

LuminUnity.asmdef missing Allow unsafe code toggle

The LuminUnity.asmdef is missing the "Allow unsafe code" toggle, which allows MLMeshingNativeBindings.cs to properly compile.

MLMeshingNativeBindings.cs(317,56): error CS0227: Unsafe code may only appear if compiling with /unsafe. Enable "Allow 'unsafe' code" in the inspector for 'Assets/MagicLeap/Lumin/LuminUnity.asmdef' to fix this error.

How to find the manual steps required for mac-os-big sur?

It is mentioned in the readme of the project there are manual steps for macOS-BigSur in the file README-macOS-Big-Sur.md found on the root of the SDK. Was the file renamed or relocated? I've searched all over, it is not in the unity package nor in the Lumin SDK folder.
I can build without problems in windows, but mac always fails, something with not being able to find an image when running mabu. Maybe an issue with the python version it tries to use. Any hints?

various compile errors

Unity 2020.1.10f
Magic Leap XR Plugin 5.1.2

Assets\MagicLeap\Lumin\APIs\MLResult.cs(1238,58): error CS1503: Argument 1: cannot convert from 'string' to 'System.IntPtr'

Assets\MagicLeap\Lumin\Bindings\MLMeshingNativeBindings.cs(499,95): error CS1503: Argument 1: cannot convert from 'UnityEngine.Vector3' to 'float'

Assets\MagicLeap\Lumin\Bindings\MLMeshingNativeBindings.cs(499,136): error CS1503: Argument 1: cannot convert from 'UnityEngine.Vector3' to 'float'

Assets\MagicLeap\Lumin\Bindings\MLMeshingNativeBindings.cs(516,69): error CS1503: Argument 1: cannot convert from 'UnityEngine.Vector3' to 'float'

Version 2.0.0 crashes MagicLeap Setup Tool

Hello,

I am trying to setup a project for the ML2 with Unity 2022.3.17f1, and am following the exact steps from https://developer-docs.magicleap.cloud/docs/guides/unity/getting-started/unity-getting-started/. However, I keep getting errors in the setuptool as soon as I import the Magic Leap SDK V2.0.0. It also does not seem to import the com.magicleap.sdk & com.unity.xr.magicleap. It seems like these missing packages cause the errors, but they won't be imported. I tried to rebuild the project from scratch multiple times, but it keeps persisting. How can I fix this?

ML SDK: 1.5.0
Unity SDK: 2.0.0
Unity Version: 2022.3.17f1

ERRORS:
Packages\com.magicleap.setuptool\Editor\SetupProcess\SetupSteps\FixXrValidationStep.cs(9,22): error CS0234: The type or namespace name 'MagicLeap' does not exist in the namespace 'UnityEngine.XR' (are you missing an assembly reference?)
Packages\com.magicleap.setuptool\Editor\SetupProcess\Utilities\MagicLeapPackageUtility.cs(16,22): error CS0234: The type or namespace name 'MagicLeap' does not exist in the namespace 'UnityEngine.XR' (are you missing an assembly reference?)
Packages\com.magicleap.setuptool\Editor\SetupProcess\SetupSteps\FixXrValidationStep.cs(18,32): error CS0246: The type or namespace name 'MagicLeapProjectValidation' could not be found (are you missing a using directive or an assembly reference?)
Packages\com.magicleap.setuptool\Editor\SetupProcess\SetupSteps\FixXrValidationStep.cs(19,23): error CS0246: The type or namespace name 'MagicLeapProjectValidation' could not be found (are you missing a using directive or an assembly reference?)

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.