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.
Vive Hand Tracking SDK provides an Unity3D plugin as a unity package. You can import the plugin in Unity3D from Assets -> Import Pacakge -> Custom Package… Menu. Samples are included in the plugin. Please refer to the Samples sections for details.
- Minimum supported Unity3D version is 5.4, including all 5.5, 5.6, 2017, 2018 and 2019 series.
- Plugin is tested on Unity3D 5.6.4p3, 2017.4.16f1, 2018.4.10f1 and 2019.2.15f1
- 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
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
- Make sure to test camera frame rate in SteamVR settings before start application.
Starting from Unity 2018.2, Unity ships an OpenCL.dll in its installation, which might not work with some graphics drivers. If you encounter OpenCL error when running inside Unity editor, please consider upgrade your Unity to 2018.3.3f1 or newer, which seems to include fix for this related issue.
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.
- 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:
- Remove VIVEHANDTRACKING_WITH_WAVEVR and VIVEHANDTRACKING_WITH_WAVEVR3 from Script Define Symbols in Android player settings.
- If you are using Daydream with GoogleVR plugin, add VIVEHANDTRACKING_WITH_GOOGLEVR to Script Define Symbols in Android player settings.
- If you need to build WaveVR app:
- Add VIVEHANDTRACKING_WITH_WAVEVR to Script Define Symbols in Android player settings.
- If you are using WaveVR 3.x or later, add VIVEHANDTRACKING_WITH_WAVEVR3 to Script Define Symbols in Android player settings.
- Remove VIVEHANDTRACKING_WITH_GOOGLEVR from Script Define Symbols in Android player settings.