Setting up Unity for Oculus GO development

Marco Gillies
Virtual Reality MOOC
7 min readJun 24, 2018

--

Unboxing my Oculus GO

I don’t normally do How to Guides, but, when setting up my Oculus GO, I noticed that there wasn’t much available online, so I thought it would be useful if I did a quick set of instructions (there are plenty of instructions online on each step, but I will try to put them together).

I certainly found that it wasn’t an easy experience first time, and involved a lot of installing and re-installing. I would recommend that you make sure you have the lastest version of Unity and Android installed and be careful about the Android SDK version (see below).

NB, this post acompanies another, more general post about the Oculus GO:

GearVR Compatible

Probably the most important information you need to know is that the Oculus GO is binary compatible with the GearVR. This has been well documented, and means that existing GearVR apps work on the GO.

I had guessed that this means that developing for the GO is the same as developing for the GearVR, but I couldn’t find that written clearly anywhere, so here I will say it:

Oculus GO development is (almost completely) the same as GearVR, so you can just follow instructions for the GearVR.

That could almost be the end of this post, because in many ways it is all you need to know, but I thought I would run through the steps. But if you just want to get on with it, this is the full set of instructions from Oculus:

Unity

I’m assuming that most people reading this post will be familiar with Unity, so I’m not going to give detailed instructions, though I would recommend getting the latest version. If you haven’t got unity, just go to their site and follow the instructions:

Android

The fact that Oculus GO is compatible with GearVR must mean that the GO runs the Android operating system, and indeed it does. The GO is just an android device, like any phone.

That means that you have to set the android SDK (software developers kit). I have to be honest, I taught a class on android development for several years, and always found it a bit of a pain, particularly for beginners. The good thing is that all you need to do is install Android and then Unity will handle everything else. The bad news is that installing Android can be a bit fiddly.

You don’t need a full Android environment, just the SDK, but installing Android Studio (the Integrated Development Environment for Android) is the easiest way of doing it. You can find the instructions here:

Once you install android studio, you only need to run it once, to set up the SDK.

When you first open it, you will see this splash screen. Choose configure at the bottom left to set up the SDK:

That will bring up this screen, which allows you to install the SDK:

The first thing that I would do is change the default location (at the top of the screen), to somewhere that you can easily find (on a Mac it defaults to a hidden location, which will make things harder later).

You then need to install the different versions of the SDK that you need (main part of the screen). At the time of writing the Oculus GO uses Androind 7.1, which is SDK version 25. Then hit OK, it will take a very long time to install, but it will get there eventually. I initially had the wrong version of Android installed which caused an error “merging manifests”. I fixed it up updating unity and installing the correct version of the SDK.

Developer Mode

To be able to run the unity projects you develop on your Android device, you need to enable developer mode. It is pretty easy to find instructions to do that for a phone, but how do you do that on the Oculus GO, given that the settings menu is pretty minimal?

You actually have to use the phone app that you installed to set up the go. You just select “Settings”. Click on the name of your GO, and then choose “More Settings”:

You will get to this settings page, where you need to choose Developer Mode:

… which will lead you to this page with a single check box that you need to enable:

Once you have set up Developer mode you need a USB cable to plug your GO into your computer, at which point you will be ready to run your unity projects on the device.

Building for Android

The last stage of the process is to set up your unity project as an Android build. I’ll assume that you already have a unity project suitable for VR.

To get it running on your GO, go to File menu->Build Settings. This is the settings menu which controls which platforms your project will be built for. On the bottom left you will see a list of possible platforms, select “Android”.

If you haven’t set Android development up yet you will just see this screen:

click on “Open Download Page” to install Android, it will install the Android modules for Unity.

Once you have done that you will see this page:

You should choose the settings listed in this page (at the time of writing they are the same as those in the picture:

You should then close that window enable VR, by going to Edit->Project Settings->Player Settings. The above page is actually a little out of date so the settings page is a bit different from what it lists. You should select the “Android” tab and then go to XR settings.

You should then select “Virtual Reality Supported” and click the little + under Virtual Reality SDKs to select the “Oculus” SDK.

Running your project on the GO

You should now be ready to run your project on the GO.

Plug your GO into your computer using a USB cable. Return to the File->Build Settings menu and click the “Build and Run” button at the bottom right.

It will ask you for a location to save your build (these are all the files needed to run the app on your device) and it will start “building” your project (turning it into a form that can run on the device).

This will take a long time the first time you do it, a very long time (at least in my case). It was several hours and I was convinced several times that it had stopped working, but eventually the build will have completed.

Once the build completes your project should start running on the device. But actually it won’t because the first build will have taken so long that your GO will have fallen asleep and your connection will have got lost.

Turn everything on again, unplug the go and plug it in again and then hit build and run. This time (and future times) it will build a lot more quickly because most of the hard work has already been done. Once done it should really run on your device and you will actually be able to see your project on your GO!

And now you can develop…

If you are anything like me the initial set up can be pretty painful, but once it is up and running, things should go more smoothly. After the first build and run you can just carry on working on your project and “build and run” without many problems.

Thanks you

I hope you found this article useful. Setting up the GO can be fiddly. If you had any problems that weren’t listed here feel free to add a comment (particularly if you know the solution).

If you are interested in VR more general this is part of a blog series on VR to accompany a MOOC (Massively Open Online Course) that we run in VR, links below:

--

--

Marco Gillies
Virtual Reality MOOC

Virtual Reality and AI researcher and educator at Goldsmiths, University of London and co-developer of the VR and ML for ALL MOOCs on Coursera.