Build and deploy a Unity project to Android

This tutorial shows you how to use flows to build and deploy Unity applications to an Adroid device. This tutorial uses the hello-world-unity-mobile project as an example.

In this tutorial, you perform the following tasks:

  • Fork and clone hello-world-unity-mobile.
  • Create an Android build of the project.
  • Configure your Android device.
  • Download and install the build on your Android device.

Fork and clone hello-world-unity-mobile

Fork and clone the hello-world-unity-mobile project. For this tutorial, name the forked project hello-world-unity-mobile-tutorial. Once the project is forked and cloned, perform the following configuration steps.

Trigger the Android build flow

The Android build and deploy to TestFlight flows are configured to run only when you add a trigger string to the commit message.

  1. Open the WVS Desktop Client.
  2. Click My projects.
  3. Select the hello-world-unity-mobile-tutorial project and click Switch project.
  4. Click New Changelist.
  5. Enter a name for the changelist.
  6. Click Start changelist.
  7. In the Changelist notes field, enter the following text:

    -execute_android
    

    This is the trigger string to trigger the flows that create an Android build and deploy it to TestFlight.

  8. Click Commit changelist.
  9. Click Push changelist.

View flow status

When the flow is building, you can view the status of the flow by performing the following steps:

  1. Go to the WVS Web Client and select the hello-world-unity-mobile-tutorial project.
  2. In the navigation panel, click Flows > Pipelines.
  3. Click the pipeline ID number to view the status of the flows in the pipeline.

Configure your Android device

Enable Developer Options

To enable Developer Options for your Android device, follow the instructions in Configure on-device developer options in the Android documentation. Actual steps may vary depending on the manufacture of your device.

Opt-in for installing unknown apps

To install applications that you downloaded from a web browser, you need to opt-in for installing unknown apps. For details, see Alternative distribution options.

Download and install the build on your Android device

  1. On your Android device, open a web browser.
  2. Go to your WVS projects dashboard.

  3. Find hello-world-unity-mobile-tutorial and click on it to open the WVS Web Client.
  4. In the naviation panel, click Outputs > Builds.
  5. In the row of the build that you want to download, click the download icon under the Actions column.
  6. When the build finishes downloading, run it to install it to your device.