Google is committed to advancing racial equity for Black communities. See how.

Build your game in Unity

Unity is a cross-platform game engine used by many games on the Google Play Store. Unity’s modular tools help you produce and deliver highly engaging 2D or 3D mobile games.

Steps to create a Unity game for Android

To use Unity to create a game experience for players on Android, follow these steps:

  1. Download and install the Unity Hub.
  2. Start the Unity Hub. On the Installs tab, add a version of the Unity Editor that supports 64-bit apps. Note that these versions support Android App Bundles, which enable smaller, more optimized downloads.

    Add an editor in the Unity Hub

  3. During the installation of the Unity Editor, make sure to include the Android Build Support module by checking the box next to it.

  4. Expand the Android Build Support module. If you are using Unity 2019 or later, add the Android SDK & NDK Tools module.

    Add the Android Build Support NDK option in the Unity Hub

  5. On the Projects tab, click New to start a new Unity project.

    Start a new project

  6. (Recommended) Import Google-authored plugins into your project:

  7. Develop your game!

  8. Change build settings to output 64-bit libraries.

Add the Game Package Registry for Unity

The Game Package Registry for Unity is a new hub for accessing the latest Google-authored plugins for Unity. You can use it directly from the Unity IDE to install any Google-hosted packages (without having to navigate to GitHub). Package updates are made available directly through the Unity IDE to keep the packages up to date with the latest Google features.

You must be on Unity version 2018.4 and later to take advantage of this hub. For earlier versions of Unity, see the Google Play Plugins for Unity project.

To get started with the Game Package Registry for Unity, pick one of the following options.

Option 1: Download an installer

To download an installer, follow these steps:

  1. Download the latest Game Package Registry for Unity release.

  2. Import the .unitypackage file by selecting the Unity IDE menu option Assets > Import package > Custom Package and importing all items.

  3. When prompted, click Add Selected Registries to agree to the Google APIs Terms of Service and enable the Game Package Registry for Unity.

To see the list of packages at any time, open the Package Manager.

Option 2: Manually edit manifest.json

To manually add the Game Package Registry for Unity to a specific project, you can edit the project manifest. Follow these steps:

  1. Open your project's Packages/manifest.json file in a text editor.

  2. Change the top of the file (above the dependencies section) to look like the following:

    {
      "scopedRegistries": [
        {
          "name": "Game Package Registry by Google",
          "url": "https://unityregistry-pa.googleapis.com",
          "scopes": [ "com.google" ]
        }
      ],
      ...
    

To see the list of packages at any time, open the Package Manager.

Open the Package Manager

  1. Open Window > Package Manager to view the list of packages.

  2. If the package manager window has a refresh button, click it to load the packages.

Download the Google Play Plugins for Unity

For Unity version 2018.3 and prior, you can download many Android and Google Play plugins directly from GitHub. The Google Play Plugins for Unity project conveniently bundles many of these together into one comprehensive plugin.

To get started, follow these steps:

  1. Download the latest release from Google Play Plugins for Unity releases.

  2. Import the .unitypackage file by selecting the Unity IDE menu option Assets > Import package > Custom Package and importing all items.

Additional resources

The following official Unity guides contain additional information on implementing other key Android features:

To help you get started quickly with key Android features, try the following Unity samples and plugins:

AdMob mobile ads platform (plugin)
Android Performance Tuner (SDK)
ARCore augmented reality (SDK)
Firebase backend services and analytics (SDK)
Google Play Games services sign-in (plugin)

For more information, see developers.google.com/unity.