GREAT NEWS! In 2015 you no longer need Unity Pro Edition to integrate Oculus into your projects. YAY!
Things you’ll need for integration:
- An Oculus (really you don’t need one to develop but how else will you test it out?)
- Oculus SDK
- Oculus Runtime
- Unity 4 Integration
Okay so, the first thing you’ll need is to have your game all set up and running, in Unity. If you’ve been following my blog then you should have the bulk of the game running.
Cool. Next we need to grab the Oculus pieces from their site.
Now if you have a Mac or Linux download from those links.
After you download the links you now need to install the runtime. Then restart your computer.
Integrating into Unity
Extract the files from the Unity Integration Package you downloaded. Go Into Unity to Assets>Import Package> Custom Package
Find where you extracted the files and navigate to the Unity Plugin.
Then hit import.
Now you should have a new folder in your Assets called OVR
Cool so now it’s integrated lets Start using the Oculus Camera in the game.
Using Oculus Cameras
Now using the Oculus Package is super easy. Oculus has already created prefabs for developers to use. They have a prefab with just the camera rig as well as one with the rig and a character motor.
To use them. Just do what you what you would normally do with prefabs. Click and Drag it into your scene. I created a test scene called OVRTest to make sure everything would work without worrying about the infinite platforms generating around me.
I placed the OVRPlayerController at 0, 2, 0.
Cool Now try running the game. You should have something that looks like this:
YAY! See super easy. The double circle screen is what will be fed to your Oculus, and with the lenses and the headset it should become one image with a 3 dimensional feel.
Now that you have the basic character installed you can add it to the main game scene and try it with the infinite platforms.