Giter Club home page Giter Club logo

mltools's Introduction

Magic Leap Device Bridge Unity Bindings

While jumping into the ML ecosystem I noticed that too often I found myself resorting to command line to interface with the device using MLDB. To simplify my workflow I created Unity Editor bindings for some of the more commonly used options. Here are the requirements:

  1. A version of Unity that supports the Lumin SDK. Can be downloaded from here.

  2. Lumin SDK downloaded from the ML Package Manager here.

  3. Enable MLDB access on your device by going to Settings -> Device -> Creator Mode and selecting Enable MLDB Access.

This photo is self-explanatory for supported features, but you can delve into the code if you're curious about how I've implemented the bindings. The gist of it is that a new process is spawned with every command sent to the device using mldb.exe on Windows and mldb on OSX, and cleaned up once the command is complete. Note that this code by default currently works with only one headset connected to the computer as I imagine most developers are not using more than one headset for prototyping yet. I will add multi-device support in time, and if there is significant interest I'll accelerate it.

MLTools interface

Import the script into an Editor folder in your project to use it. It will appear in the top toolbar under Magic Leap. If you have any suggestions on features you'd like to see added (or if you run into any bugs), please post an issue.

A few notes

  • If you wish to build your project with more options than just being a development build, please go through Unity's Build Settings and not MLTools.
  • File management on-device over MLDB will not work unless a package is marked as a development build. Hopefully ML changes this in the future.
  • The console output is displayed in a window for convenience.
  • Packages are automatically signed by default.
  • Application.persistentDataPath in Unity returns the %packagename%/documents/C2/ folder on device. Files are automatically uploaded into this folder, and List Files returns its contents.
  • I've put in a few checks to squash most potential avenues of bugs, but I'm sure I forgot a few. If you manage to break the interface please let me know and I'll patch that issue.
  • If they don't yet exist, a Build, DeviceFiles, and Logs folder are generated in the root of your project. Builds, downloaded device files, and device logs are saved there respectively.
  • Scenes added to the build are taken from the current selected scenes in Unity's Build Settings.

mltools's People

Contributors

gjrgj avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar

mltools's Issues

Win32 Exception

George, thanks for creating these tools! I'm getting a Win 32 exception when trying to install to device:

Updata To Unity 2019.1.4f1

Hello gjrgj,

I'm a user of your tools for a long time for about 3 months. Really appreciate what you have accomplished and this tool really save a lot of time for debugging for MagicLeap. As the SDK of MagicLeap would no longer support on the Unity 2018, I have to change your script for manually type the path of certificat and SDK to work. I expect you can update your tools for Unity 2019 or otherwise maybe allow me to contribute to the project? Waiting for your response.

Best regard

MekaDiva

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.