Hey, Unity devs! In this post, we’ll cover our Unity 5 Core Assets, including the VR assets, essential UI resources for developers, and how the HandController Prefab works with the Oculus Rift. Full documentation for our Unity plugin can be found on the developer portal.

Note: The Orion Unity Core Assets have been redesigned and rearchitected from the ground up. Learn more in this blog post or see the Orion Unity documentation.

Unity Core Assets

While our Core Unity Assets have been designed for Unity 5, older versions are also available on the developer portal. When using the assets, be sure to have the correct versions of Unity, the Leap Motion SDK, and (if applicable) the Oculus SDK. The recommended versions are indicated on our Unity downloads page.

The key to the assets is the HandController Prefab – a virtual Leap Motion Controller that you can drop directly into your projects. It does the job of placing your hands in Unity space, including managing type and unit conversions. To learn more about how to drop the HandController and other assets into your project, visit our getting started page.

Unity + VR

We’ve also included a VR integration that combines Leap Motion interaction with the Oculus Rift. This includes video passthrough, which uses the Image API so that you can use raw infrared imagery in your project along with Leap Motion tracking. Your users’ hands as well as other nearby objects will appear in ghostly infrared. (To disable the image passthrough provided in many of our example scenes and in the VR Assets, simply disable the Quads for both eyes in LeapImageRetriever/ImageRetrieverTypes.)

The assets also include a camera management setup that makes it possible to switch between the Oculus camera and the Normal camera. By detecting whether or not a Rift is connected, the assets set the appropriate camera, so that VR and desktop modes are supported by the same app.

Image Hands for Hybrid Reality

Using our older hand assets, you can already reach into a demo and see robot hands, minimal hands, even realistic hands for different genders and skin colors. But these aren’t your hands – it’s like choosing from a catalog of hand models. That’s why we built a new Unity asset feature that brings your real hands into any VR experience. With Image Hands, you now have the absolute realism of live video, with the full interactivity and 3D behavior of our classic rigged hands.

UI Widgets for Desktop and VR

User interface design can be a huge challenge, especially with the wide open possibilities of touchless VR. That’s why we’ve built a set of four UI widgets designed for VR and desktop environments:

Toggle Button Widget. Designed to function by itself or in a grid, the Toggle Button Widget has a wide variety of potential uses, including menu items (e.g. toggle subtitles, start game, etc.), toggling doors to open/close, reaction-based games (e.g. drumming), and in-game controls (e.g. an ignition button or cockpit switch).

Designed to function by itself or in a grid, the Toggle Button Widget has a wide variety of potential uses, including menu items (e.g. toggle subtitles, start game, etc.), toggling doors to open/close, reaction-based games (e.g. drumming), and in-game controls (e.g. an ignition button or cockpit switch). Slider Widget. You can use the slider in a multitude of use cases including menu items (e.g. adjust brightness), and in-game controls (e.g. airplane accelerator).

You can use the slider in a multitude of use cases including menu items (e.g. adjust brightness), and in-game controls (e.g. airplane accelerator). Scroll Widget. We provide a Widget for scrolling content with the flick of your hand. It has numerous applications including displaying user instructions, chat logs, and scrolling through pictures.

We provide a Widget for scrolling content with the flick of your hand. It has numerous applications including displaying user instructions, chat logs, and scrolling through pictures. Dial Picker. Select from a variety of options using this 3D dial, which uses a scrolling interaction.

Arm HUD

We’re cheating a bit with this one – Arm HUD isn’t part of the Core Assets, but our open source Planetarium demo. This “smartwatch for your entire arm” can change functionality based on the orientation of your arm. If you hold your arm like you’re checking a wristwatch, you’ll see the current settings associated with the VR planetarium. If you hold your arm with the inside of your wrist facing towards you, the HUD displays a number of settings that you can change by pressing various buttons and sliders.

Building your own Leap Motion + VR Prefab

For all you DIYers out there, we’ve published a few key tips for constructing your own Prefab combining the Leap Motion Controller and Oculus Rift in our VR Best Practices Guide. For starters, you’ll want to use the HandController script from our core Unity assets, as it’s essential to integrating Leap Motion data with the Unity worldspace. Unless you really want to reinvent the wheel, be sure to have our core assets in place.

From there, be sure to consult VR Best Practices section 5: Space and Perspective. This section includes in-depth examples and insights for positioning the controller and using the passthrough data. What sorts of Unity resources would you like to see next? Let us know in the comments!

This post has been modified to reflect recent updates to our Unity assets. For augmented reality, we now recommend 1:1 alignment between the virtual and Leap Motion cameras and 100% scaling. Learn more in this post.