Preparing and building to your Android device - shaunrd0/spinningcube GitHub Wiki

Preparing your Android device

Next, we need to enable developer mode on our Android devices - this gives you access to various options related to building and debugging, and lets you test the game on your device.

  1. On your Android device, navigate to Settings > About phone or Settings > About tablet.

  2. Scroll to the bottom and then tap Build number seven times. A popup will appear, confirming that you are now a developer.

  3. Now navigate to Settings > Developer options > Debugging and enable USB debugging.


Building an Android project using Unity

Now we’re ready to build the .apk!

  1. Connect your Android device to your computer using a USB cable.

  2. You may see a prompt asking you to confirm that you wish to enable USB debugging on the device. If so, click OK.

  3. In Unity, open the Build Settings from the top menu (File > Build Settings).

  4. Click Add Open Scenes to add the Main scene to the list of scenes that will be built.

  5. Click Build And Run.

Build In Unity

You will be prompted to choose where to build your .apk. A good place to do this is in a dedicated builds directory in the root of your project.

  1. Create a directory called "Builds" in the root of your project (not within your Assets directory, but at the same level as it).

  2. Select that directory as the location to build to.

  3. In the text input field marked Save As, enter "Android" and click Save.

If you have setup debugging properly on your device, Unity will now create an .apk file called "Android" in the “Builds” folder, build that file to your device, and run it automatically.


These instructions were pulled directly from a tutorial provided by Unity, see the link below for more details. I left out some project configuration steps since these will be done for you if you clone this repository. If you wanted to create a new Android project, there would be more steps involved in setting up your project.

Unity's complete Android build & debugging tutorial