The start samples here depend on VIVE OpenXR Unity Plugin and will inspire you on how to use the features.
The HTC License applies to the samples.
This project was built using the Unity 2021.3.16f1.
Clone this repo using the "Code" button above, or below commands:
- Using SSH
git clone [email protected]:ViveSoftware/VIVE-OpenXR-Sample-Unity.git
- Using HTTPS
git clone https://github.com/ViveSoftware/VIVE-OpenXR-Sample-Unity.git
- Make sure you're using Unity 2021.3.16f1 or newer.
- Switch to the Android or Windows platform in Build Settings.
- Click on VIVE > OpenXR Installer > Install or Update latest version from the menu bar to import the VIVE OpenXR Unity Plugin.
- Navigate to Project Settings > XR Plug-in Management > OpenXR platform settings, select VIVE XR Support and enable features you need.
MR
- Set Build
Settings > Platform
to Android - Import [Customizable Planet Shaders] package into project.
- Add scenes
BaseScene
,GameFlow
,RobotAssistant
,Setup
andMRPerformance
to the build setttings accordingly. - Check OpenXR in
Project Settings > XR Plug-in Management > Initialize XR on Startup
- In
File > Build Settings
clickBuild And Run
- MR Documentation
- MR Performance Setting Documentation
- Passthrough Documentation (To be released)
- Accessory Documentation (To be released)
- Human Info Documentation (To be released)
- Interaction Documentation (To be released)
- Body Tracking Documentation (To be released)
-
Make sure your project uses the same SDK version
-
Move the samples to your project
Copy Samples Directory
- Copy Assets/CodeSamples directory to your own project
Create and Import UnityPackage
- Open VIVE-OpenXR-Sample-Unity project in Unity
- Right-click on Assets/CodeSamples and select Export Package...
- Save package in an easy location to retrieve
- Open your own project (where you want the samples to be added)
- Click on Assets > Import Package > Custom Package... from the menu bar
- Find the package we saved in step 3 and click Open