Skip to content

Installation

Pierre Depaz edited this page Feb 4, 2020 · 3 revisions

Unity

  1. Download Unity Hub. The Unity Hub will help you manage your Unity versions.

  2. Once UnityHub is downloaded and installed, click on Installs on the left and Add. Add the version 2019.3 at the beginning of the 2020 Spring semester.

  3. When prompted which components you should install, make sure to tick the platform you will develop for (i.e. Android Build Support and/or iOS Build Support and/or Mac Build Support)

Unity Components Installation

Android

  1. Downloading and installing Unity with the Android Build Support is not enough. You need to install Android-specific too.

  2. Start by downloading the latest JDK (JDK 8 at the beginning of Spring 2017). Install it and remember where you install it.

  3. Then, download Android Studio. Android Studio is the easiest way to install the Android SDK. Go through all of the installation steps with the default settings.

  4. Once you've installed the Android SDK, open it and go to Preferences > Appearance > System Settings > Android SDK. Tick the checkboxes for Build-Tools, Platform-Tools and SDK Tools.

Installing Components

  1. Next time you build a project in Unity for Android, it will ask you to locate the JDK and the Android SDK. Browse to the install location and select the respective install folders.

iOS

  1. Download and install XCode, which will allow Unity to communicate to your iPhone. Sign in to XCode with your Apple ID, which should be linked to a Personal Developer Account.

  2. Done!

  3. Just kidding. Once you build a project with Unity, Unity will generate an XCode project folder. You will then need to open the .xproj file, which should automatically open in XCode. In XCode, press the Play button at the top left, with your iPhone tethered and the VR app should launch on the device.

Test a Project

  1. Download the Cardboard SDK from here

  2. Open Unity and create a new 3D project.

  3. Click on Assets > Import Package... > Custom Package.

  4. Navigate to the folder where you've downloaded the Google VR SDK from step 1 and open GoogleVRForUnity_1.xxx.unitypackage.

  5. In the pop-up window, leave everything checked and click Import. Now, all of the files should be in a folder called GoogleVR. Check the Console tab at the bottom panel to check for any errors.

  6. Open GoogleVR > Demos > Scenes > HelloVR.unity. Click the play button and look around!

Build Settings

  1. Now that we've installed all necessary software in order to build on Android or Unity, there are a few settings we need to look at before launching the build.In Unity, select File > Build Settings.

  2. In the bottom left list, select the platform you want to build for (Android, iOS, Desktop), and click on Switch Platforms. The current platform is the one with the Unity Logo next to it. It might take some time to switch from one platform to another, as assets get converted to the appropriate format.

  3. Then, click on Player Settings. At the very top, change Company Name and Product Name to something unique (i.e., not Google and Youtube -you could pick, for example AltReal2017 and FirstTest). This will only be public if you decide to put your VR app on the Play Store or on the App Store.

  4. Click on Resolution and Presentation to expand that menu. Under the section Orientation > Default Orientation, select Landscape Left from the dropdown menu.

  5. In Other Settings, change the Bundle Identifier so that it matches the Company Name and Product Name that you've chosen at the beginning (which would be, in our case, com.AltReal2017.FirstTest).

  6. For Android, set the Minimum API Level to 19 (Android 4.4 KitKat). For iOS, set Target Minimum iOS Version to 7.0.

  7. Done! Click Build and Run.