This section assumes you know the hardware requirements and features of the Vive Hand Tracking SDK. Please read Vive Hand Tracking SDK Overview section before this section.
Minimum supported Unity3D version is 5.4, including all 5.5, 5.6, 2017, 2018, 2019 and 2020 series.
- Plugin is tested on Unity3D 5.6.4p3, 2017.4.40f1, 2018.4.24f1, 2019.4.4f1 and 2020.1.9f1
- Unity version 5.4 and 5.5 series are not tested, though the plugin should work
- A Unity version that supports Android ARMv8 library is required if you what to use ARMv8 version of Vive Hand Tracking SDK
- This means Unity 2018 or later, plus Unity 2017.4.16f1 or later
- ARMv8 version is preferred over ARMv7 version if possible
- Unity LTS versions are recommended.
Import the package¶
Vive Hand Tracking SDK provides unity package
Vive Hand Tracking Unity.unitypackage.
You can import the plugin in Unity3D from
Assets -> Import Pacakge -> Custom Package... Menu.
There is also a separate package (
Assembly Definition.unitypackage) for assembly definition files (.asmdef).
Please import this package if using Unity 2019 or newer.
This package is required to support the new XR system introduced in Unity 2019.3.
If you need asmdef files for Unity 2018 or earlier, you need to manually modify the asmdef files or Unity complains about missing reference.
See Select Hand Engine section for selecting backend engines.
Samples are included in the plugin. Please refer to the Samples sections for details.
Based on different platform, process of setup may be different. Please refer to the sections below to setup each platform you use.
SteamVR disables camera by default. This means a fresh installed SteamVR cannot use Vive Hand Tracking SDK without manual setup. See Camera Setup for how to setup SteamVR and check camera availability before using Vive Hand Tracking SDK.
- Make sure OpenVR is loaded as current VR before start detection.
- Goto Player Settings and set VRSettings (5.x) or XRSettings (2017+) to include OpenVR.
- SteamVR plugin is NOT required for the plugin to function.
- The library DLL requires Microsoft Visual C++ Runtime 2015
- Follow the steps in Camera Setup with SteamVR (Vive, Vive Pro or Valve Index) or Vive Console (Vive Cosmos) before start application.
WaveVR (Vive Focus)¶
- You need to import WaveVR SDK v2.1.8 or later into your Unity project
- Camera permission declaration and request are handled in the plugin using WaveVR API.
- Both ARMv7 and ARMv8 binaries are provided in Vive Hand Tracking SDK.
The binaries are selected by Unity based on your actual archietecture setup in PlayerSetings.
- WaveVR 3.1.1 or later is required for ARMv8 support.
- WaveVR Hand API (requires WaveVR 3.2.0) can be used as optional backend. See Select Hand Engine section for details.
If you installed Wave XR Plugin from package manager, make sure you installed
VIVE Wave XR Plugin - Native package and imported
Assembly Definition.unitypackage as well.
- The android phone library works for non-VR, Cardboard and Daydream.
- The native library is tested on Pixel.
- Camera permission declaration is included in plugin.
- Camera permission runtime request is not included in the plugin.
You need to make sure camera permission is granted before starting detection.
- The runtime permission on Daydream is handled using GoogleVR plugin.
- For Unity 2018.3+, camera permission is handled using Android runtime permission API
- Both ARMv7 and ARMv8 binaries are provided in Vive Hand Tracking SDK. The binaries are selected by Unity based on your actual archietecture setup in PlayerSetings.
- The app must be in landscape left orientation.
Selecting Android Binary (Advanced Users Only)¶
Vive Hand Tracking SDK provides different binaries on Android for Android phones and WaveVR platform. This is due to using different APIs to get camera frames, which requires different native libraries.
Skip this section if you don’t plan to build both Android phone and WaveVR binaries from the same project.
Editor scripts in
Assets/ViveHandTracking/Editor folder are used for easier Android binary selection.
The scripts detect if WaveVR plugin is imported in your project to decide which binary is selected at build time.
This should be enough for most use cases, unless you want to support both Android phones and WaveVR in the same Unity project.
You can manually control the process by modifying/removing the two scripts to suit your need. Required steps for each platform are listed below.
- If you need to build Android phone app:
VIVEHANDTRACKING_WITH_WAVEVR3from Script Define Symbols in Android player settings.
- If you are using Daydream with GoogleVR plugin, add
VIVEHANDTRACKING_WITH_GOOGLEVRto Script Define Symbols in Android player settings.
- If you need to build WaveVR app:
VIVEHANDTRACKING_WITH_WAVEVRto Script Define Symbols in Android player settings.
- If you are using WaveVR 3.x or later, add
VIVEHANDTRACKING_WITH_WAVEVR3to Script Define Symbols in Android player settings.
- If you are using WaveVR Hand API (requires WaveVR 3.2.0), add
VIVEHANDTRACKING_WAVEVR_HANDto Script Define Symbols in Android player settings.
VIVEHANDTRACKING_WITH_GOOGLEVRfrom Script Define Symbols in Android player settings.