# Quickstart for Google VR in Unity on iOS

This guide shows you how to set up Google VR development with Unity and build a
demo Cardboard app for iOS.

## Set up your development environment

Hardware requirements:

- You'll need an iPhone 5 or higher, running iOS 8.0 or higher.

- You'll need a [Cardboard viewer](https://vr.google.com/cardboard/get-cardboard/).

Software requirements:

- Install Unity:

  - **Recommended version:** [LTS release 2018.4](https://unity3d.com/unity/qa/lts-releases) or newer
  - **Minimum version:** 5.6

  Make sure that the **iOS Build Support** component is selected
  during installation.

- Make sure your environment is configured for iOS development.

  Refer to Unity's guide for [Getting started with iOS development](https://docs.unity3d.com/Manual/iphone-GettingStarted.html).

## Download the Google VR SDK for Unity

- Download the latest `GoogleVRForUnity_*.unitypackage` from the
  [releases page](https://github.com/googlevr/gvr-unity-sdk/releases).

  The SDK includes the following demo scenes for Cardboard:

  | Scene | Description |
  |---|---|
  | **HelloVR** | Simple VR game in which you find and select a cube |

  <br />

## Create a new Unity project and import the Google VR Unity package

1. Open Unity and create a new **3D** project.

2. Select **Assets** \> **Import Package** \> **Custom Package**.

3. Select the `GoogleVRForUnity_*.unitypackage` file that you downloaded.

4. In the **Importing Package** dialog, click **Import**.

   Accept any [API upgrades](https://docs.unity3d.com/Manual/APIUpdater.html),
   if prompted.

## Configure build settings and player settings

1. Select **File** \> **Build Settings**.

2. Select **iOS** and click **Switch Platform**.

3. In the **Build Settings** window, click **Player Settings**.

   Configure the following player settings:

   | Setting | Value |
   |---|---|
   | **Player Settings** \> **Other Settings** \> **Virtual Reality Supported** | Enabled |
   | **Player Settings** \> **Other Settings** \> **SDKs** | Click **+** and select **Cardboard** |
   | **Player Settings** \> **Other Settings** \> **Target minimum iOS version** | **8.0** or higher |
   | **Player Settings** \> **Other Settings** \> **Bundle Identifier** | Follow reverse the DNS format suggested by Apple |

## Preview the demo scene in Unity

1. In the Unity **Project** window, go to **Assets** \> **Google VR** \>
   **Demos** \> **Scenes** . Open the *HelloVR* scene.

2. Press the **Play** button. In the **Game** view you should see a
   rendered demo scene.

   Note that although the scene here is monoscopic, the rendering on your
   phone will be stereo.
3. Interact with the scene using simulation controls:

   | Type | Simulated action | What to do |
   |---|---|---|
   | Head movement | Turn your head | Hold **Alt** + move mouse |
   |   | Tilt your view | Hold **Control** + move mouse |
   | **Cardboard** input | Button press | Click anywhere in the **Game** view |

## Build and run the demo scene on your device

1. Connect your phone to your computer using a USB cable.

2. Select **File** \> **Build and Run**.

   Unity builds your project and opens the generated Xcode workspace.

   > [!NOTE]
   > **Note:** If you use **Build Settings...** \> **Build** to build your project, be sure to open the generated `*.xcworkspace` *workspace* file in Xcode, not the included `*.xcodeproj` *project* file. Opening the project file will result in build errors.

3. Put the phone in your viewer and try out the demo.

## Next steps

- Learn more about the [SDK capabilities](https://developers.google.com/vr/unity/guide).

- Learn more about [Spatial Audio](https://developers.google.com/vr/concepts/spatial-audio).