I managed to set up my first app for the Oculus Quest with Unity’s new Universal Render Pipeline (earlier it was called Lightweight Render Pipeline) in four hours. I write this article, so that for you it may take much less. This article was written in March 2020, it maybe actual until the end of the year, but I am sure the Unity landscape changes too much to be actual after 2021. (Unity version 2019.3.7f1)

I believe Unity 3D first build to Quest could have been done in half an hour. There are obstacles in the way and these make it like a steeplechase. (see pic below) Most likely think the main problem is not the time necessary for the setup, It is the conflict, that you do everything right and it is not running! I started development around 1992 and so I’ve seen a few systems in my life. I know how to put together PC hardware, how to create Android and iOS apps, how to put together VR systems. Still two hours into the process I felt like Robinson Crusoe on a remote desert island. I would say we certainly loose some developers on the way into this, like 20-50% who will say that either they are not enough to develop on VR or the system is just garbage. Anyway let’s go through the issues that arose.

I was following this links, they show the basic steps to build for Quest:

Quest 1: Oculus assets in two folders

Unity complains about multiple Oculus assemblies in different folders with the same name.

Keep the assembly in the Android folder

Solution: Delete the non android folder and keep the android folder. (Android is for Quest, non android is for Rift)

Quest 2: ADB.EXE incompatibility

It gave this error: adb server version (41) doesn't match this client (40); killing...

adb server version (41) doesn't match this client (40); killing...
ADB server didn't ACK
Full server startup log: /var/folders/0q/jh77wwcx1cs989k89kv79mqr0000gn/T//adb.501.log
Server had pid: 34316
--- adb starting (pid 34316) ---
adb I 05-09 21:30:11 34316 4407796 main.cpp:56] Android Debug Bridge version 1.0.40
adb I 05-09 21:30:11 34316 4407796 main.cpp:56] Version 28.0.2-5303910
adb I 05-09 21:30:11 34316 4407796 main.cpp:56] Installed as /usr/local/bin/adb

First I tried to change the Project Settings folder to a non unity android SDK, but it didn’t work that way.

Solution: as written here you have to copy adb.exe, adbwinapi.dll, adbwinusbapi.dll from the standard android SDK to the Unity specific version. (First backup, then overwrite.) Why? Why not? This is Unity development, anything can happen.


Quest 3: Build took FOREVER

I have a good intel i7 with 32gbs of RAM, but still each build took like 4-5 minutes (to fail 😉 ).

Solution: Check Development Build, it brings down building time to around one minute.

Quest 4: App starts on the quest and goes into a neverending wait cycle.

This was a nightmare error, because I didn’t know how to handle it. The app started on the device and then it seemed it loads something. I was thinking maybe for the first time it needs one minute to prepare some textures or shaders or whatever.

Solution: Then LarsonMattr gave me a clue: do not use Vulcan, use OpenGL ES 3.0. All right. I googled again how to change that and then it worked.

Quest 5: Rendering runs only on the left eye

The system started, the app started – finally – and then I could only see with my left eye. Right eye render stayed blank.

Solution: Project settings: change Stereo Rendering Mode from default Multipass to Multiview.

What can we learn from this?

Finally I made it, it worked, still my usual open questions remains: what can we learn from this?

  • Defaults should be working! (Multiview instead of multipass.)
  • If a rendering system – vulcan – is not advised or working on Quest, it should run to an error and not get stuck forever on the device. EVERYTHING is better than having the Quest on and watching the three dots flashing by without knowing if it will ever change.
  • I think Unity 3D is a general company creating software for multiple devices. So it is the job of the device maker starting with O to create an asset that does a full integration. This integration should include checks that make sure that the software runs well. To be specific a menu item “Oculus Check” with sub-items like “Oculus Quest Check” and “Oculus Rift Check” would be very usefl. These routines then would go and eliminate a bunch of pitfalls along the way.
No photo description available.
Oculus Controller Test running on the Quest

PS: Oculus Menu

Actually there is an Oculus menu where you can start certain tools and even build. Still it is f**ked up for the moment, if you want to build it builds very slow productive version for 3-4 minutes just to fail in the last second with “Gradle not found”. Tried to fix this error for an hour and then finally decided to use the Unity standard build method. We need to quickly publish a learning solution for Quest and we are stuck with a halfway build soultion. Some strong opinions emerged regarding the bermuda triangle of Unity – Oculus – Android SDK Build Tools.

PS: 2019.3.7f1 Text Mesh Rendering Problem Android

I Unity version 2019.3.7f1 with Universal Rendering Pipeline (Lightweight Rendering Pipeline) the Text Mesh (Textmesh Pro) was rendering totally displaced on a distant plane. This was now fixed with version 2019.3.9f1. Upgrade advised.