A Unity package containing useful tools and scripts for SteamVR projects, including tracker management, UI utilities, and data recording capabilities.
Created by: Alex van den Berg - 2025-06-10
With contributions from: Nicolas Wenk
For more information visit our website: mlnlab.nl, or our wiki page.
- Tracker Configuration System - Reliable tracker assignment based on serial IDs
- ViveTrackersUI - Interactive UI for managing tracker configurations
- SteamVR Event System - Easy trigger and button press event handling
- Data Recording - Optional UXF integration for experiment data collection
- Utility Scripts - Smooth following, jitter monitoring, rig alignment, and more
- Download the files in this repo.
- Just drag them into your Unity assets.
- Open Unity Package Manager (
Window > Package Manager) - Click the
+button and selectAdd package from git URL - Enter the repository URL
After importing the package, you must copy the contents of the SteamingAssets folder to your project's StreamingAssets folder:
- Navigate to
Assets/SteamVR Utils/SteamingAssets/ - Copy
tracker_config.txtto your project'sAssets/StreamingAssets/folder - If your project doesn't have a
StreamingAssetsfolder, create one in yourAssetsdirectory first
This package only works with the SteamVR Plugin.
Installation:
- Get the SteamVR Plugin from: https://assetstore.unity.com/packages/tools/integration/steamvr-plugin-32647
- Add it to your Unity assets first
- Open Package Manager → My Assets → Import SteamVR Plugin
- Last tested version: 2.8.0 (SDK 2.0.10)
For advanced data recording and experiment management capabilities.
Installation:
- Repository: https://github.com/immersivecognition/unity-experiment-framework
- Follow the UXF installation instructions from their repository
Enable UXF Support:
- Go to
Project Settings > Player > Scripting Define Symbols - Add
UXFto the symbols list - Scripts with UXF integration will now be fully functional
For OpenXR compatibility with VIVE devices.
Installation:
- Download VIVE OpenXR Plugin UnityPackage from: https://github.com/ViveSoftware/VIVE-OpenXR-Unity
- Import the unitypackage file in Unity
- Select
VIVE/OpenXR Installerfrom the Unity menu - Press "Install or Update latest version"
For enhanced VIVE controller input handling.
Installation:
- Go to
Project Settings > Package Manager > Scoped Registries - Add the following registry:
- Name: VIVE
- URL: https://npm-registry.vive.com
- Scope(s): com.htc.upm
- Open
Window > Package Manager > My Registries > VIVE - Install "Vive Input Utility"
Enable VIU Support:
- Go to
Project Settings > Player > Scripting Define Symbols - Add
VIUto the symbols list - VIU-dependent scripts will now be fully functional
The TrackerConfigurationLoader ensures trackers are consistently assigned based on their serial IDs rather than connection order.
Setup:
- Add the
TrackerConfigurationLoadercomponent to any GameObject that should be tracked by a VIVE tracker - Set the
Configured Namefield to match a name fromtracker_config.txt(e.g., "VR-17", "VR-19", etc.) - When the scene starts, the tracker will automatically assign based on its ID from the config file
Configuration File Format:
The StreamingAssets/tracker_config.txt file uses the format:
TrackerName;TrackerSerialID
VR-17;LHR-F806079D
VR-19;LHR-481B26F5
Interactive UI system for managing tracker configurations in real-time.
Setup:
- Drag the
ViveTrackersUIprefab into your scene - Unity will prompt to import TMP Essentials - click "Import" (you don't need examples & extras)
- If your scene doesn't have an Event System:
- Right-click in Hierarchy
- Go to
UI > Event System - Add the Event System (required for UI button functionality)
Usage:
- Start the scene - the UI will automatically detect trackers with
TrackerConfigurationLoadercomponents - Set New Tracker IDs: Change the text field next to any tracker name and click "Submit" to assign a new tracker ID
- Save Configuration: Submitting changes automatically saves the configuration to a CSV file in StreamingAssets
- Load from File: Click "Load from File" to restore previously saved configurations
- Get from Scene: Click "Get from Scene" to refresh the UI with current TrackerConfigurationLoader settings
Attach to a controller to easily handle trigger button events.
Usage:
- Add to any SteamVR controller GameObject
- Configure trigger events in the inspector
- Assign methods to run on trigger press/release
Advanced button press event handling for VIVE controllers.
Usage:
- Add to any GameObject
- Configure controller role and button type
- Assign UnityEvents to trigger on button press
Advanced data logging for SteamVR devices integrated with UXF.
Features:
- Records position and rotation data for all tracked devices
- Thread-safe recording for high-frequency data capture
- Integrates seamlessly with UXF experiment framework
Smooth camera following with configurable damping.
Monitor and debug tracking jitter issues.
Tools for aligning VR rigs and tracked objects.
Visual debugging aids for coordinate systems.
- UXF-related errors: Add
UXFto Scripting Define Symbols or ensure UXF is properly installed - VIU-related errors: Add
VIUto Scripting Define Symbols or install VIVE Input Utility - SteamVR errors: Ensure SteamVR Plugin is properly imported and up to date
- Trackers not assigning: Check that
tracker_config.txtis in yourStreamingAssetsfolder - Wrong tracker assignments: Verify serial IDs in the config file match your physical trackers
- UI not working: Ensure you have an Event System in your scene and TMP Essentials imported
- High CPU usage: Check recording frequency settings in data recording components
- Frame drops: Consider reducing tracking update rates or using threaded recording options
TrackerConfigurationLoader.cs- Core tracker assignment systemViveTrackerUIManager.cs- UI management for tracker configurationTrackerInputRow.cs- UI component for individual tracker rowsUXFSteamVRTracker.cs- UXF-integrated data recordingVIUButtonPressEvent.cs- VIU button event handlingSteamVRTriggerEvent.cs- Basic trigger event handlingSmoothFollower.cs- Smooth following utilityJitterMonitor.cs- Tracking quality monitoringRigAlignment.cs- VR rig alignment toolsAxisGizmo.cs- Visual coordinate system debugging
ViveTrackersUI.prefab- Complete tracker management UITrackerInputRow.prefab- Individual tracker UI componentRecorder.prefab- Data recording setupReplayer.prefab- Data playback system
tracker_config.txt- Tracker serial ID mapping
See LICENSE file for details.
For more information visit our website: mlnlab.nl, or our wiki page.