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:
Perform the following steps to create a simple VR scene and build an android .apk
file:
From the menu, go to
File
, clickNew Scene
to create a fresh empty scene.From the menu, go to
File
, clickSave As
to save the scene just created. Select the saving path and enter the name for this empty scene (e.g. YVRDemo).Enter the
Project
tab, expand thePackages > YVR Core > Prefabs
folder, drag theYVRCameraRig
prefab into the Hierarchy panel. Ensure that bothPosition
andRotation
property of theYVRCameraRig
game object in Hierarchy panel is (0, 0, 0).Right-click on the
Main Camera
game object in Hierarchy window, and clickDelete
.Right-click on the empty area of Hierarchy panel, select
3D Object > Cube
to create a cube game object. Ensure thatPosition
property of theCube
game object is (0, 0, 10). For now, the Hierarchy panel should look like:From the menu, go to
File -> Build Settings
, and clickAdd Open Scenes
button in theBuild Settings
window to ensure this scene will be compiled into the output.apk
file.In the
Build Settings
window, clickBuild
button, and select the output path and enter the name of the output.apk
file in the popped-up window.
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.