Building an Android application

To build your application for Android, take the following steps:

  1. Connect your Android device to the computer using a USB cable. You may see a prompt asking you to confirm that you wish to enable USB debugging on the device. If so, click OK.
  2. In Unity, select File | Build Settings to load the Build dialog.
  3. If it doesn't appear, add your current scene in the Scenes In Build portion of the dialog. This can be done by selecting the Add Open Scenes.
  4. Change the platform to Android and click Switch Platform.
  5. Set Texture Compression to ASTC.
  6. Select Player Settings... and set the following attributes:
    • Company Name
    • Product Name
    • Other Settings
    • Package Name
    • Minimal API Level: API level 22
    • XR Settings
    • Virtual Reality Supported: On
    • Virtual Reality SDK: add Oculus
  1. Click Build and Run to create an Android executable application and load it onto the mobile device:
>
Figure 4.8: Complete layout of Virtual Gallery