Building for Oculus Rift
To build for Oculus Rift you can use OpenVR. But if you plan to publish in the Oculus Store and/or use Oculus-specific SDK for other high-value features offered in the Oculus ecosystem, you will need to build to the Oculus SDK, as follows:
- Configure your Unity
Build Settings
to target theStandalone
platform - In
Player Settings
, underXR Settings
, setVirtual Reality Enabled
- Ensure
Oculus
is at the top of theVirtual Reality SDKs
list. - Download and
Install
the Oculus Integration package from the Asset Store, as instructed previously
Now we will add the OVR camera rig to the MeMyselfEye
object in our scene:
- Look in your Project window, under the Assets folder you should have a folder named OVR.
- Within that is a subfolder called
Prefabs
. Drag the prefab namedOVRCameraRig
from theAssets/OVR/Prefabs/
folder into your Hierarchy. Place it as a child object ofMeMyselfEye
. - Set its Y position to 1.6 by setting its
Transform
toPosition
to (0
,1.6
,0
). - Disable the
Main Camera
object...