Skip to content

Troy-Ferrell/XR-BREAK

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

XR-BREAK

This is an example XR Application using Unity and the Mixed Reality Toolkit. Tutorial series can be found here.

The application was designed for the HoloLens 2 device and makes use of hand tracking, voice commands, and Spatial Mapping. The player has a ball that can be launched using hands and gestures to collide with targets randomly placed in the environment. Bulls-eye targets must be hit by the ball while the player needs to shoot the ball through ring targets to score.

Demo

This project has been recently updated to support the Oculus platform and Quest device, as well as the new hand tracking feature released by Oculus.

Demo

How to play

  1. Launch application
  2. Scan environment to build scene map
  3. Targets will begin to randomly appear
  4. Show and close either hand and then hold this gesture. The longer this gesture is held, the more powerful the ball will fire.
  5. Open hand to launch the ball and try to capture the targets to score.
  6. Quickly close/open your any hand to return the ball to your person

Say "Show scoreboard" or "Hide scoreboard" to toggle the scoring UI. Say "Toggle Profiler" to toggle visibility of the diagnostics profiler HUD

How to

Built with MRTK 2.5.1, Unity 2019 LTS and Visual Studio 2019. Requires Webcam and Spatial Perception capabilities in UWP appx.

Hololens/Windows Mixed Reality:

Building from Unity

  1. The first step is to build from the Unity editor to a Visual Studio solution for a UWP app.
  2. Open the Build Settings Window (Cntrl+Shift+B shortcut) via File > Build Settings.
  3. Ensure the Universal Windows Platform is applied and that the root scene is added to the Scenes in Build.
  4. Click the Build button and select a folder for where the Visual Studio solution will be placed.
  5. For faster build times, it is recommended to build to the same folder every iteration, disable anti-malware scanning software, and utilize an SSD.

Building Visual Studio

  1. After Unity finished building the UWP Visual Studio solution, a file explorer should automatically appear with the build folder as focus. Open this folder and open the .sln file.
  2. With Visual Studio open, one can change any UWP appx package changes such as icons and app name, etc., by double clicking the Package.appxmanifest file under the Universal Windows project.
  3. Next step is to build the UWP Visual Studio solution to effectively create an Appx package that can be deployed to device.
  4. Select Master or Release (Debug will run very slow on device).
  5. Select ARM as the architecture type (HoloLens 2 has an ARM based processor, HoloLens 1 has an x86 processor).
  6. Ensure build target is Device.
  7. Select Build tab > Build solution.
  8. Once the build completes, the app can be deployed via Build tab > Deploy Solution. This assumes you have developer unlocked and paired you HoloLens device to your PC and that the HoloLens is connect via USB.
  9. HoloLens Emulator notes

Oculus Quest:

Editor Mode (via Oculus Link)

  1. Open the project and root scene
  2. Open the Build Settings Window (Cntrl+Shift+B shortcut) via File > Build Settings.
  3. Ensure the Android platform is active (if not, select and click Switch Platform)
  4. Ensure the Oculus Quest device is connected via USB to the development machine.
  5. In headset, follow all prompts to allow USB Debugging, Oculus Link, etc.
  6. In Unity, enter play mode. The app should launch inside of the HMD.

Build APK and Deploy

  1. Ensure the Oculus Quest device is connected via USB to the development machine.
  2. In headset, follow all prompts to allow USB Debugging, Oculus Link, etc.
  3. Open the Build Settings Window (Cntrl+Shift+B shortcut) via File > Build Settings.
  4. Ensure the Android platform is applied and that the root scene is added to the Scenes in Build.
  5. Under Run Device property, selec the Oculus Quest entry.
  6. Click the Build & Run button

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages