Skip to main content

How to Build

Building your Unity project allows you to compile your game into an executable file so you can test it on actual devices or publish it to storefronts. This guide walks you through compiling your project for Android, covering both APK (for local testing) and AAB (for publishing) formats.

Quick Access

You can quickly open the Build Profiles window at any time by pressing Ctrl + Shift + B (Windows) or Cmd + Shift + B (Mac), or by navigating to File > Build Profiles.

Build Window

To begin, select your target platform (e.g., Android) from the platform list and click Switch Platform.

Build Select Platform

Android Builds

You can build your Android project in two different formats. Because the initial setup for both formats is identical, we will set up the Player and Keystore settings first, and then choose our build format at the very end.

Step 1: Configure Player Settings

  1. Open the Build Profiles window.
  2. Click on the Player Settings button.
Select Player Settings
  1. When the Player Settings window appears, ensure the Android tab (the robot icon) is selected.
Select Platform
  1. Scroll down and expand the Other Settings section.

Step 2: Set Project Versions

Scroll down within Other Settings until you find the Version and Bundle Version Code fields. It is crucial to update these numbers before creating a new build.

Version Parameters:

ParameterFormatDescriptionExample
VersionX.Y.ZRepresents the Major (X), Minor (Y), and Patch (Z) numbers of your game.1.0.2
Bundle Version CodeYYYYMMDDHHA numeric code based on the current date and time (Year, Month, Day, Hour).2025050313
Update Version and Bundle Code
Why use a Date-Time code?

Using the YYYYMMDDHH format for your Bundle Version Code guarantees a unique, incrementally higher number for every build. The Google Play Store requires every new upload to have a strictly higher Bundle Version Code than the last!


Step 3: Configure Publishing & Keystore Settings

Before building, you must sign your app using the project's custom Keystore.

  1. Scroll down to the Publishing Settings section.
  2. Check the box to enable Custom Keystore.
  3. Click Select and locate thistlebee.keystore (found inside the Keystore folder in your project directory).
  4. Enter the required credentials below to unlock the Project Key section:

Keystore Parameters:

ParameterValue
Keystore Passwordsuccessful
Project Key Aliasthistlebee
Project Key Passwordsuccessful
Publishing Settings

If everything is entered correctly, you can safely close the Player Settings window and return to the Build Profiles window.


Step 4: Choose Format and Build

Depending on your goal, you will now choose to build either an APK or an AAB.

Option A: Building an APK (For Local Testing)

Use this option if you want to test the game directly on your Android phone or share the file with team members.

  1. In the Build Profiles window, ensure that Build App Bundle (Google Play) is unselected.

  2. Click Build.

  3. Choose an output folder for your file (we recommend creating/using a dedicated Build folder inside your project directory).

    Build Profiles APK
  4. Wait for the compilation process to finish. Once completed, your .apk file will be generated in the selected folder.

Option B: Building an AAB (For Google Play Store)

Use this option if you are preparing a release to upload to the Google Play Console.

  1. In the Build Profiles window, ensure that Build App Bundle (Google Play) is selected.

  2. Click Build.

  3. Choose an output folder for your file (e.g., the Build folder).

    Build Profiles AAB
  4. Wait for the compilation process to finish. Once completed, your .aab file will be generated in the selected folder, ready for store submission!