Unity

Getting Started

By following this quick start guide, you'll build an interactive demo scene showcasing different types of hand interactions on VITURE devices.

Unity's XR Interaction Toolkit (XRI) already provides a comprehensive hands interaction demo with three major interactors: near-field direct interactor and poke interactor for close-range objects, plus far-field ray interactor for distant targets. The original sample scene uses XRI's default input actions, we'll replace those with VITURE-specific inputs to make all interactors work seamlessly with VITURE hand tracking.

getting-started

Prerequisites

Before getting started, ensure you have downloaded the VITURE Unity XR SDK (com.viture.xr) and have the following tools installed:

Unity Hub - Latest version
Unity Editor 6000.0+ - Any version 6000.0 or higher
Android Build Support - Install this module through Unity Hub

Project Setup

Create a new Unity project using the Universal 3D template. While URP isn't mandatory, we highly recommend it for all VITURE XR projects.

create-project

After the project is created, navigate to File > Build Profiles and switch the platform to Android.

create-project

Extract the VITURE Unity XR SDK (com.viture.xr-x.x.x.zip) and copy the com.viture.xr folder into your project's Packages directory.

packages-directory

Go to Edit > Project Settings > XR Plug-in Management and enable VITURE.

plugin-management

Navigate to Edit > Project Settings -> Player -> Other Settings -> Rendering and set OpenGLES3 as the only Graphics API. Vulkan support is planned for future releases.

graphics-api

Next, go to Edit -> Project Settings -> Player -> Other Settings -> Identification and set Minimum API Level to Android 13.0 (API level 33).

minimum-api-level

Finally, navigate to Edit -> Project Settings -> Player -> Other Settings -> Configuration and set Active Input Handling to Input System Package (New). Unity will prompt to restart—click Apply to proceed.

active-input-handling

Your project is now configured to VITURE XR development. Next, we'll import the sample assets and build an interactive demo scene!

Import Required Samples

Navigate to Window > Package Manager > Unity Registry and install XR Interaction Toolkit and XR Hands.

install-packages

From the XR Interaction Toolkit package, import the Starter Assets and Hands Interaction Demo samples.

xri-samples

Finally, go to Window > Package Manager > In Project > VITURE XR Plugin and import the Starter Assets sample.

viture-sample

Configure Demo Scene for VITURE Input

Go to Edit > Project Settings > Input System Package and set Project-wide Actions to Viture Input Actions.

input-actions

Navigate to Assets > Samples > XR Interaction Toolkit > 3.0.8 > Hands Interaction Demo and open the demo scene. This scene uses default XRI input actions that we need to replace with VITURE-specific ones.

hands-demo-scene

Delete the existing XR Origin (XR Rig) from the scene hierarchy. Replace it by dragging XR Origin (Viture) from Assets > Samples > VITURE XR Plugin > 0.2.1 > Starter Assets > Prefabs into the scene.

viture-xr-origin

Drag the Viture Hand Menu prefab from Assets > Samples > VITURE XR Plugin > 0.2.1 > Starter Assets > Prefabs into your scene. When prompted, click Import TMP Essentials to add Unity's advanced text rendering system.

import-tmp

The Viture Hand Menu provides essential system functions—Recenter (resets XR coordinate origin) and Home (exits to launcher)—that we highly recommend including in all VITURE XR applications.

viture-hand-menu

The default table position is too high for comfortable interaction. Select both TableHandle and Table in the Scene Hierarchy and move them lower and forward for better accessibility.

move-table

The default Directional Light is a bit dim for the demo. Delete it and create a new Directional Light to brighten up the scene.

For optimal performance, we recommend disabling shadows in your URP settings. Navigate to Assets > Settings > Mobile_RPAsset and disable the Cast Shadows option.

disable-shadow

Build APK

Go to File > Build Profiles > Scene List and click Add Open Scenes to include only the HandsDemoScene in your build.

scene-list

Click Build, create a Build folder, name your APK, and click Save to start the build process.

build-apk

Congratulations! 🎉 You've built your first VITURE XR application.

Deploy to Device

First, ensure ADB (Android Debug Bridge) is installed on your computer.

Enable Developer Mode by opening Settings and navigating to About Neckband > Build number. Tap the Build number area 7 times to unlock Developer Mode.

tap-build-number

Navigate to System > Developer options and enable Wireless debugging. Click Allow when prompted.

wireless-debugging

Important Note: The wireless debugging prompt cannot be clicked using hand tracking in SpaceWalker mode. If you encounter this situation, you have two options to proceed:

Use the VITURE Neckband Remote app to control the cursor and click Allow.
Switch to Android Mode by pressing the bottom-left physical button on the neckband to open the quick settings menu, then select the rightmost option.
quick-settings

With wireless debugging now enabled, go to System > Developer options > Wireless debugging and tap Pair device with pairing code to display the pairing panel.

pair-device

Pair and connect using ADB commands in your terminal, and then install your APK:

# Pair with the device (one-time setup)
adb pair <IP_ADDRESS>:<PAIRING_PORT>
# Enter the pairing code when prompted
# Connect to the device
adb connect <IP_ADDRESS>:<PORT>
# Install your APK
adb install path/to/your/app.apk

Once installed successfully, launch SpaceWalker on your VITURE neckband and find your app to enter the demo scene!