Open Unity app. Create an account if necessary, and create a new project called HelloUnity. Make sure you choose 3D project.
On the Menu Bar, select Unity -> Preferences -> External Tools
This gets a little bit tricky on the Mac… You need to tell Unity where the Java JDK and the Android SDK are located, but both of these are buried in hidden folders. You will need to open up Terminal to find these folders and set them in Unity.
In Terminal, run the following commands:
chflags nohidden /Library
chflags nohidden ~/Library
The library folders are now visible in the finder.
The Android SDK is located at ~/Library/Android/sdk
The Java JDK is located at /Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home
Install the Cardboard SDK. On the Menu Bar, go to Assets -> Import Package -> Custom Package… and select the Cardboard SDK Unity Package.
Choose “Import All”.
In the Project window’s Assets folder, go to Cardboard/Prefabs.
Drag the CardboardMain prefab into the hierarchy.
Delete the original MainCamera from the hierarchy.
Select CardboardMain in hierarchy and set position to 0,1.6,0. This moves the camera up to around 1.6 meters, a good average height for a human’s eyes.
You are now ready to build your VR scene.
When you are done and are ready to export to an external device, go to the menu bar and choose File -> Build Settings…
Select Android Platform and choose Switch Platform.
When platform switch is done, choose Player Settings… from the build window.
Most of the defaults are fine, but you will need to change some player settings.
Company Name: Anything you like (let’s use NYU IDs)
Product Name: the name that will appear on the phone’s Home Screen
Go to “Other Settings”
bundle Identifier: reverse URL. It needs to be unique and by convention is the company’s website + the product name. We can make it something like edu.nyu.itp.ck987.terrain . Alphanumeric characters only. No hyphens.
Minimum API level: Android 4.4 KitKat (Api level 19)
Resolution and Presentation:
Orientation/ Default Orientation: Landscape Left (this will keep the image from Auto-Rotating)
Plug in your Android Phone to your computer’s USB port.