https://github.com/vivesoftware/vive-openxr-sample-unity
https://github.com/vivesoftware/vive-openxr-sample-unity
Last synced: 8 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/vivesoftware/vive-openxr-sample-unity
- Owner: ViveSoftware
- License: other
- Created: 2024-06-28T02:22:45.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-10T07:56:51.000Z (about 1 year ago)
- Last Synced: 2025-06-30T20:03:37.524Z (8 months ago)
- Language: C#
- Size: 65.1 MB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.pdf
Awesome Lists containing this project
README

# VIVE OpenXR Code Samples
The start samples here depend on [VIVE OpenXR Unity Plugin](https://developer.vive.com/resources/openxr/unity/) and will inspire you on how to use the features.
The [HTC License](./LICENSE.pdf) applies to the samples.
This project was built using the [Unity 2021.3.16f1](https://unity.com/download).
## Get Code
Clone this repo using the "Code" button above, or below commands:
- Using SSH
```sh
git clone git@github.com:ViveSoftware/VIVE-OpenXR-Sample-Unity.git
```
- Using HTTPS
```sh
git clone https://github.com/ViveSoftware/VIVE-OpenXR-Sample-Unity.git
```
## Run in Unity
1. Make sure you're using **Unity 2021.3.16f1** or newer.
2. Switch to the **Android** or **Windows** platform in **Build Settings**.
3. Click on *VIVE* > *OpenXR Installer* > *Install or Update latest version* from the menu bar to import the **VIVE OpenXR Unity Plugin**.
4. Navigate to *Project Settings* > *XR Plug-in Management* > *OpenXR* platform settings, select **VIVE XR Support** and enable features you need.
## Test on VIVE XR Elite / VIVE Focus Vision
MR
+ Set Build `Settings > Platform` to Android
+ Import [[Customizable Planet Shaders]](https://assetstore.unity.com/packages/vfx/shaders/customizable-planet-shaders-131872) package into project.
+ Add scenes `BaseScene`, `GameFlow`, `RobotAssistant`, `Setup` and `MRPerformance` to the build setttings accordingly.
+ Check OpenXR in `Project Settings > XR Plug-in Management > Initialize XR on Startup`
+ In `File > Build Settings` click `Build And Run`
## Developer Guidelines
- [MR Documentation](https://github.com/ViveSoftware/VIVE-OpenXR-Sample-Unity/blob/main/Documentations/MR/JelbeeMR.md)
- [MR Performance Setting Documentation](https://github.com/ViveSoftware/VIVE-OpenXR-Sample-Unity/blob/main/Documentations/MR/MR_Performance.md)
- [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)
## Integrate Samples to Your Own Project
1. Make sure your project uses the same SDK version
2. Move the samples to your project
Copy Samples Directory
+ Copy [Assets/CodeSamples](./Assets/CodeSamples) directory to your own project
Create and Import UnityPackage
1. Open VIVE-OpenXR-Sample-Unity project in Unity
2. Right-click on [Assets/CodeSamples](./Assets/CodeSamples) and select Export Package...
3. Save package in an easy location to retrieve
4. Open your own project (where you want the samples to be added)
5. Click on Assets > Import Package > Custom Package... from the menu bar
6. Find the package we saved in step 3 and click Open