Search Results for

    Build Your First App

    This guide helps you build your first VR app in Unity. At the end, you will have an installation file (.apk) of your VR app which can be installed on Play For Dream devices.

    Note

    Please ensure that you have completed all steps described in the following guides:

    1. Configure Development Environment
    2. Import Packages
    3. Configure Unity Settings

    Perform the following steps to create a simple VR scene and build an android .apk file:

    1. From the menu, go to File, click New Scene to create a fresh empty scene.

    2. From the menu, go to File, click Save As to save the scene just created. Select the saving path and enter the name for this empty scene (e.g. YVRDemo).

    3. Enter the Project tab, expand the Packages > YVR Core > Prefabs folder, drag the YVRCameraRig prefab into the Hierarchy panel. Ensure that both Position and Rotation property of the YVRCameraRig game object in Hierarchy panel is (0, 0, 0).

      YVRCameraRig Transform

    4. Right-click on the Main Camera game object in Hierarchy window, and click Delete.

    5. Right-click on the empty area of Hierarchy panel, select 3D Object > Cube to create a cube game object. Ensure that Position property of the Cube game object is (0, 0, 10). For now, the Hierarchy panel should look like:

      Hierarchy Panel

    6. From the menu, go to File -> Build Settings, and click Add Open Scenes button in the Build Settings window to ensure this scene will be compiled into the output .apk file.

    7. In the Build Settings window, click Build button, and select the output path and enter the name of the output .apk file in the popped-up window. Build Settings

    If everything succeeds, there should be a .apk file with your specified name in your specified output path.

    The next guide Enable Device For Development and Testing will describe how to install the output .apk file into Play For Dream devices.

    In This Article