See videos for in-depth explanation and see below for a checklist refresher.
Part 1 - Software Setup
Part 2 - Project Setup
Quest Setup
- Make sure your Oculus account has an organization associated with it. Do this at dashboard.oculus.com.
- Set your Oculus to Developer Mode. Do this from the Oculus app on your smart device.
- Sometimes this may end up getting disabled, so if things are not working, remember to come back and double check this.
- Plug your Oculus into your computer and check “Allow USB Debugging” in the pop-up window, checking the “always allow” box.
- If you are using a link cable, having Quest Link enabled should not affect sending builds to the device.
Unity Setup
- You need to have “Android Build Support” checked (and the drop down boxes for it checked too), under modules (in the drop down menu), for the unity version you are using.
- All of this can be found in the install section of the unity hub. You’ll figure it out.
Project Setup
- Use the “3D” Template when creating a new project, don’t use the High Definition Render Pipeline (HDRP) or Universal Render Pipeline (URP). For now.
- Under File > Build Settings, switch the target platform to Android.
- Now you can “Build” to create a .apk file, or “Build and Run” to create the .apk and install it on a connected device.
- Install the “XR Plugin Management” package.
- Under “XR Plugin Management” in the project settings window (which is now available because this package is installed).
- You want to add the appropriate loaders. For quest, check the box for the Oculus loader under the android tab.
- You may want to enable it under the desktop tab as well for Oculus Link/Rift S support.
- In Edit > Project Settings > Player Settings, change the “Android Minimum API Level” to 23. If you are reading this in the future, the quest may have updated and require a newer oldest supported version.
- I recommend using the XR Interaction Toolkit, which is (at the time of typing), a preview package.
- In Package Manger, select advanced > Show Preview Packages, and then install the XR Interaction Toolkit.
- This gives you some easy rig creation options under the GameObject > XR menu.
- You will likely want to “Seed Legacy Input Bindings” under the Assets menu.
- This is part of Legacy Input Helper package, which should be installed by default when you install “XR Plugin Management”.
- This allows you to easily use the Input.GetAxis(“”); and similar functions to get XR controller input data.
Notes
- You don’t need Unity to install the .apk onto the device. Building the apk and sending it to the device are independent processes. You can install it on the quest with sidequest (graphical software) or Android Developer Bridge, command line tools.
Using The Oculus Integration
If you want to use Hand Tracking, which is not currently supported with the above technique, you will need to use the “old” way of doing things. While out of date for Unity, Oculus has been updating their software integration for it.
Note, the following advice has been last tested for 2018.
- The Quest and Unity setup is the same.
- Switch To Android Build Target before importing the oculus integration to save some time. (File> Build Settings).
- Get the “Oculus Integration” from the asset store.
- When you import it, the integration will ask to upgrade some elements, and restart the editor. I don’t know why. It’s a pain.
- Go to Edit > Project Settings > Player, and scroll down to XR Settings. Check “Virtual Reality Supported”.
- To use Oculus Link and get in-editor (play mode) testing support, you may need to import the “Oculus Desktop” package from the package manager.
- Look at sample scenes and use provided prefabs to get started.