Couple of days ago I got my hands on the new Oculus Quest device and I had the opportunity to deploy a Unity (version 2019.1.4f1) project to it.
It is an Android device, so if you are familiar with GearVR or Oculus GO development you will feel at home and only thing you need to do from software perspective, is to update your Oculus integrations package and change the target device in your OVRManager script that is usually attached to camera rig to Quest.
If you are new to Oculus Quest without prior Android device experience, but with Rift or Vive experience, you will have some disappointment around the workflow, so the best way to develop for Quest for you might be using Rift for the most part, and casually rendering to Android to check your performance in Quest, and only on final stages of development use Quest only, as to this date there is no way to Play and preview apps in Oculus Android devices from Unity. But as controller mappings and behavior are almost the same, you will feel at home with both devices.
For net new VR developer software prerequisites are neatly described in this article. And when you are done with software prerequisites, come back and read the remainder about optimal development environment.
- To wire up your headset and controllers use OVRPlayerController, or plain OVRCameraRig object from Unity Integrations package. I recommend importing only essentials, as that package is huge. I usually take only VR and Spatial folders for Quest or GO development, as they contain the essential parts.
- Attach to your camera rig hand anchors OVRControllerPrefab and pick the correct device from the dropdown.
- And after that, clean up the VR folder from prefabs and materials You don’t plan to use, like if you plan to develop exclusively for Quest, I suggest getting rid of heavy Rift, GO and GearVR assets that take up space in your project and slow it down during compression to Android formats.
- To get some nice laser pointers and examples how to use them you can grab this package, however it is outdated at the time of writing and does not have Quest controllers prefab. So I suggest grabbing those from Oculus integrations package VR -> Prefabs -> OVRControllerPrefab and swapping the outdated prefab with a fresh one.
- I highly recommend using Lightweight Render Pipeline for Quest projects. Here is an excellent video explaining what that is with comparisons. But in a nutshell, that is as it says, a lightweight, single-pass renderer that is optimized for mobile apps, and Quest apps are mobile apps with very high demand on solid 60FPS or more, so its a must to use it for projects beyond a skybox and cube on the screen.
- Keep in mind that in order to use assets that are not created specifically for LWRP you need to convert them after importing in Edit -> Render Pipeline -> Upgrade Project materials…., otherwise things will show up purple in your scene.
- Optimize quality settings for mobile. Here is a good article on optimization. Its a bit dated, but read it carefully, there are good explanations about why you should do each of those.
- For debugging utilize new Unity Android Logcat feature. Trust me, you will need it!
- In case your sprites look jittery, check if you have MipMaps generated. Its usually by default, but sometimes imported assets don’t have it, so its super important for smooth pictures.
- Use OVRPlayerController prefab from Oculus integrations VR – > prefabs folder to move around your environment with mouse and keyboard during Unity Play mode, otherwise you will be unable to debug your environment other than building it every time into the Quest.
- Use GIT version control and make a commit whenever you achieve certain milestone that works, but commit only Assets and ProjectSettings folders, rest of files and folders are generated by Unity and take ridiculous amount of disk space.
I hope you found this article useful, keep developing new VR experiences, and let me know what you think in comments section below!
Copyright of the featured image – Oculus / Facebook, Inc.