Running the Magic Leap Gesture Example in the Simulator with Unity

Unitys released some Magic Leap examples so creators can get an idea of what the Magic Leap 1 is capable of. Here’s a step-by-step guide to running the Gestures examples in Magic Leap Simulator with Unity.

Before you launch Unity, you’ll need to have the magic leap simulator up and running. If you’re not sure how to do that here’s some handy guides that’ll get you setup:

1. Load the Gestures Example

Loading the Magic Leap Gestures Example in Unity

Open the Gestures Scene in Unity.

2. Update the Projects Build Settings

Changing the Build Settings in Unity to Run a Magic Leap Project

Before we can run the scene we need to update the build settings. Open the File menu and click Build Settings.

Setting the Unity Build Settings to Run a Magic Leap Project

In the Build Settings window select Lumin OS as the Platform. Then set the Lumin SDK Location by clicking the button with three dots on it.

Setting the Lumin SDK in Unity Build Settings

In the file chooser window navigate to the Lumin SDK, then click Choose.

If you’re not sure where the Lumin SDK is located you can find the path in the Magic Leap Package Manager. Click on the Lumin SDK row in the Common Packages table, then click Open Folder in the right pane. It should open the finder on the SDK.

Opening the Magic Leap Remote Simulator

Setting the Lumin OS Platform in Unity

Once you’ve set the Lumin SDK Location and selected Lumin OS as the platform click Switch Platform.

3. Enable Zero Iteration Mode

Enabling Zero Iteration in Unity to Run Magic Leap Project

Before we run the project we need to enable zero iteration. Click on the Magic Leap Menu, then click on Enable Zero Iteration.

Restarting Unity in Zero Iteration Mode

Once the zero iteration libraries are imported you’ll need to restart Unity. Click Restart in the popup. If the libraries are already loaded then you’ll get a popup asking if you want to reimport them.

4. Run the Gestures Example

Running the Magic Leap Gesture Example in Unity

Click the Play button to run the gesture example.

Magic Leap Gesture Example Running In Unity

After a few moments you’ll see the gestures example load in the game window in Unity.

5. Playing with the Gestures Example in the Magic Leap Simulator

Gesture Example Running in the Magic Leap Simulator

If you switch to the Magic Leap Simulator window you should see the gestures example in the Eye View pane.

Click Gestures in the left property menu.

Selecting Gestures in the Magic Leap Simulator

Click on different gestures in the Gestures tab.

Selecting a Left Hand Gesture in the Magic Leap Simulator

When you choose gestures in the Gestures tab you should see the selected gesture turn green in the Eye View pane. You’ll also see some dots appear showing where the (imaginary) hand is positioned in the view.

Selecting Right Hand Gestures in the Magic Leap Simulator

You can use gestures from either hand, and the simulator can detect the gestures from both hands at the same time.

Editting Hand Positions in the Magic Leap Simulator

To move the green dots which represent where your hands are when they’re making the gestures you can update the transform x,y,z coordinates for the Position and Orientation and you’ll see the dots move accordingly.

Troubleshooting

If the gestures example doesn’t load in the Magic Leap Simulator try stopping the simulator and shutting everything down including Unity. Launch the Magic Leap Simulator and start it up, then once it’s up and running, start Unity.

< PreviousLoading the Magic Leap Examples in Unity

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.