Oculus Plugin for Unity: Setup, Use, Errors, and Fixes

This post contains affiliate links, meaning at no cost to you I earn a commission if you purchase through one of the links on this page. Read the full disclosure here.


Easily use the Oculus plugin for Unity! Plus fixes for any errors that come up along the way.

Setup

1.) Get the plugin on the Asset Store (requires Unity 2018.4+).
2.) Import through the PackageManager (Unity: Window -> Package Manager. May need to switch to Packages: My Assets).
3.) Setup the development environment and configure the project.
4.) Enable your Oculus fo testing.
5.) Start your game!

Errors

UnityException: Update your app id by selecting ‘Oculus Platform’ -> ‘Edit Settings’

Create/find your app at on https://dashboard.oculus.com.
Set both application ID’s in Oculus -> Platform -> Edit Settings.

The Oculus XR Plugin isn’t enabled from XR Plugin Management in Project Settings

Install XR Plugin Management at Edit -> Project Settings -> XR Plugin Management.
Click Oculus checkbox to install Oculus support.

NullReferenceException: Object reference not set to an instance of an object (in OculusSampleFrameworkUtil)

OVRPlugin.wrapperVersion may return nil while in an unsupported platform.

Platform is not currently supported by OVRPlugin

File -> Build Settings -> Select Platform (Android for Oculus) and click Switch Platform.

Before you go check out our top tips and favorite assets!

Leave a Comment

Your email address will not be published. Required fields are marked *