Magic Leap With Open CV For Unity Example by EnoxSoftware - 19

Games & Projects

MagicLeap with OpenCVforUnity Example

Unknown LicenseUpdated 29 days agoCreated on January 30th, 2019

MagicLeap With OpenCVForUnity Example


  • MagicLeapOne Lumin OS 0.94
  • Unity 2018.1.9f2-MLTP10 (64-bit)
  • OpenCV for Unity 2.3.3+


  1. Download the latest release unitypackage. MagicLeapWithOpenCVForUnityExample.unitypackage
  2. Create a new project. (MagicLeapWithOpenCVForUnityExample)
  3. Import “C:/Users/xxx/MagicLeap/tools/unity/v0.19.0/MagicLeap.unitypackage”
  4. Import the OpenCVForUnity.
    • Setup the OpenCVForUnity. (Tools > OpenCV for Unity > Set Plugin Import Settings)
    • Set “Assets/OpenCVForUnity/Plugin/Android/libs/arm64-v8a/” Import Settings. magicleap_settings.png
    • Enclose the code related to the WebCamTexture class with #if UNITY_EDITOR and #endif. ( The WebCamTexture class is not included in the MagicLeap API, so an error occurs at build time. ) enclose_utils.png Assets/OpenCVForUnity/org/opencv/unity/Utils.cs (L496 - L620) enclose_webcamtexturetomathelper.png Assets/OpenCVForUnity/org/opencv/unity/helper/WebCamTextureToMatHelper.cs (L1 - L939)
    • Delete “Assets/OpenCVForUnity/Examples” folders. delete_examples.png
    • Downlod Copy yolov3-tiny.cfg to “Assets/StreamingAssets/dnn/” folder. Downlod Copy yolov3-tiny.weights to “Assets/StreamingAssets/dnn/” folder. Downlod Copy coco.names to “Assets/StreamingAssets/dnn/” folder.
  5. Import the MagicLeapWithOpenCVForUnityExample.unitypackage.
  6. Add the “Assets/MagicLeapWithOpenCVForUnityExample/*.unity” files to the “Scenes In Build” list in the “Build Settings” window.
  7. Check CameraCapture checkbox in Publishing Settings.
  8. Build and Deploy to MagicLeap.



Show all projects by EnoxSoftware