How to Publish Your Games to AppGallery with UDP(Unity Distribution Portal)

Seyyid Yiğit
Huawei Developers
Published in
15 min readFeb 15, 2023

--

AppGallery and Unity

Introduction

Welcome to the wild and wacky world of game publishing on Huawei’s AppGallery! If you’re new to this app store, don’t worry, it’s not as scary as it seems. With the help of our trusty friend, the Unity Distribution Portal (UDP), you’ll be a pro in no time. So sit back, grab some popcorn, and get ready to learn how to launch your game into the big leagues.

Publishing games on Huawei’s official app store AppGallery can be a scary process for developers who haven’t used AppGallery before. But with the Unity Distribution Portal (UDP), the process becomes much easier. Whether you’re an experienced Unity developer or new to the process, this guide is written in plain and simple language to help you navigate the complexities of publishing your game to one of the world’s largest app stores. So don’t sweat it, let’s get started and bring your game to the masses on one of the world’s largest app stores!

Note: This guide assumes you have a Unity and Huawei AppGallery Developer account. If you do not have an account, it is important to create one first and then continue with the guide for a seamless flow.

Note: This guide is intended to be a practical and step-by-step guide rather than theoretical information. You can learn the theoretical information you are curious about by trying it in the link below 😎

Now that we have read all the pre-information, we can start.

Start

Game Creation via Unity Distribution Portal (UDP)

The Unity Distribution Portal (UDP) allows you to distribute your game to multiple app stores, including AppGallery.

First, we log in at Unity Gaming Services (unity3d.com).

Unity Dashboard Display
Unity Dashboard Login Screen

After successfully logging in, we will see a screen like the following.

Unity Dashboard

We create our project by saying Create a project. If you have created a project before, you can skip this step.

Unity Dashboard Project Creation

After creating our project, the following screen will open with our project selected at the top left.

Unity Dashboard Project Viewing

Now that we have completed our project creation process, we can move on to game creation.

Unity Dashboard Game Creation

Click on any of the Add Your First Game or Add Game buttons to open the following screen and create our game.

Unity Dashboard Game Creation

You can edit the steps below according to yourself except for the first 2 steps.

  • Step 1, shows which store you want to distribute your game in. Since we will distribute our game on AppGallery, we choose this option.
  • Step 2, asks how we will make money in the game, here we need to choose the In-App Purchase option. Because Huawei AppGallery requires this service.
  • Step 3, asks which languages the game information will contain, here you can choose if you want a language other than English.
  • Step 4, asks if there is a region you are especially interested in for distribution.
  • Step 5, asks how long it will take for your game to go live, here you can choose a time according to your own goals. It is not very important.

Premium Price does not support AppGallery, so do not choose it. You can also select Ads if you want to use ads.

Game creation steps
Game creation steps

The steps to create a game show us which store our game is suitable for. We choose Huawei AppGallery. Then we choose Crete Game Plan because then it will give us a roadmap and we will follow it.

Creating a Game Plan

In the image below, we see the game plan created. We will follow the steps here in order.

Game Plan

In order to start the Game Build to-do list, we first need to open our project through Unity Editor. The important point here is that our Unity account is the same account as Unity Distribution Portal.

Unity Hub Login

After logging in with the same account, we open our project via Unity Hub.

Unity Hub Project Opening
Unity Editor

If you’ve come this far, congratulations 🎉. From now on, we can start connecting our game to the Unity Distribution Portal.

Almost

Unity Distribution Portal Installation and Linking to Game

First, we enter the Package Manager and install the Unity Distribution Portal package and after installing it, we import the UDP sample project. The reason for importing the project is to test whether the binding process is successful or not and to complete the test steps easily.

Unity Editor UDP Download and Sample Project Import

After completing the download and importing the project, we open our scene. We will execute our test operations on this scene.

Unity Editor Sample Project Opening

We connect our project to the game we created on the Portal by going to the Unity Distribution Portal (UDP) settings.

Opening the UDP Service Screen

After saying Go to the Service Window from the settings, we will see the screen on the left below. There we click on Use an existing Unity project ID and follow the steps in the picture on the right below. We fill in the fields here according to the project you created on the portal and connect them to each other.

Linking Local Project and UDP Project

After our project is connected, we see our information on the following screen. Then we go to Unity Portal by clicking on Dashboard.

UDP Service Screen

Here we go to the bottom of the Game Info by following the steps below. We save the Unity Project ID field by typing the Unity Project ID we obtained in the Unity Editor above.

Unity Project Id Linking

After the saving process is completed, we return to Unity Editor and enter the UDP settings. There, we see a screen synchronized with the information on the Portal, as in the right one from the images below.

UDP Project Connectivity Check

In the images below you can see how to create a test account and add items for IAP (in-game purchase). The reason we do these operations is to test whether we can connect with the Portal. When you Push the information you enter here, it should come to the Portal or when you Pull the information you enter in the Portal, it should come here.

Test Account and Product Addition

Now it’s time to activate the In-App Purchasing(IAP) service. You can activate the service by following the steps in the image below.

Activating the IAP Service

When the service is activated, you will see a screen like the one below. Your version numbers may change depending on the package version you are currently using.

Activating the IAP Service

Instead of adding IAP products via Unity Editor, you can add products via Portal if you want.

Viewing or Editing Added Products via Unity Editor

The prices of the products you add should be equivalent at different exchange rates. There are 2 ways to do this. If you click on the Convert button as in the image below, it will automatically convert all your products to other currencies. Or if you want to do it individually or if you want to enter your own exchange rates, you can do it by clicking the Manage amounts and currencies button in the product line.

Exchange Rate Regulation

Now we have added our products and adjusted their rates, now we can move on to the testing phase after we create the signature of our application and get the build.

If you have come this far, congratulations, you have now connected your project with the Portal and opened the IAP service, and added products. 🎉

Almost

Android Keystore Creation

For the signature process, we select the first option in the App Signature field. Then we download the PEPK tool.

PEPKT Tool Download

Open Unity > File > Build Settings > Player Settings > Publishing Settings tab.

Keystore Creation

Let’s press the KeyStore Manager button. You select KeyStore… > Create New > AnyWhere or other location.

Keystore Creation

Enter the name and password information and make a note of it. (Make sure to note that if you forget, you may not be able to update your application again.)

Enter the Alias and Password information. You can also write the name of the organization and leave the others blank.

Press the Add Key button and the key will be created.

Keystore Creation

In this step, we have successfully created our keystore file. In the following step, we will need the path to the file we created.

Keystore Creation

We go to the directory where the PEPK tool you downloaded earlier is located and open a CMD. In the image above, we edit the command we copied in step 6 as shown below and we get our zip file.

Keystore Creation

We upload and save the zip file we specified as Output to Unity Portal as in the images below. This signature will save us from the stores’ own signature processes later on.

Uploading Keystore File

We return to Unity Editor again and we build our sample project. After we get the build, we do the testing on our phones.

Build

The images below were taken from the phone during the test. It is important here that we do not run the test through the Unity Editor. In order for the tests to be considered valid, we must perform our tests on the phone.

The images include the Initilize (initialization), then purchase and consume processes respectively. In order to pass the test successfully, you need to repeat these processes.

Game Test
Game Test

If you successfully complete the test process, your test process will appear as successfully completed on the Unity Portal as in the image below.

Test Result Display

If you have come this far, you should have successfully completed all your operations on UDP (Unity Distribution Portal). Now it’s time to stop working on the demo scene and start using our own scenes.

Almost

Connecting to Huawei AppGallery and Release the Game

Here is my own game, I used the design and codes of the demo scene again. Since the design issue is completely up to your choice, I leave the modifications there to you. In the images below you can see the step-by-step in-game purchase process.

Game Test

Now that we have successfully completed our testing in our own game, we will create our project and application in Huawei AppGallery and then release our application to AppGallery via UDP.

Our first step will be to create a project and app, if you already have them, you can skip this step.

We enter the Huawei AppGallery Connect site, say Sign in on the top right and log in with our account.

Huawei AppGallery Login

After logging in, we click My project on the AppGallery Connect home page and click Add project from the page that opens. Then we type our project name and continue.

Huawei AppGallery Project Creation

Here, since some of the Huawei Mobile Services (HMS) are dependent on the Analytics service, we enable Analytics here and allocate a region by default.

Huawei AppGallery Project Creation

After completing our project creation process, we create our application. You can adapt the fields here according to yourself, but the most crucial point here is that the package you write in the Package name field must end with “.huawei”. If you do not provide this, your game will not be accepted.

Note: Don’t forget to make the package name of your game the same in Unity Editor!!!

Huawei AppGallery App Creation

After creating our app, we will use our In-App Purchase service, so we activate it.

Huawei AppGallery IAP Activation

After completing these operations on AppGallery, we switch to Unity Portal and connect to AppGallery from there.

Connecting Huawei AppGallery with Unity Deployment Portal

You may be faced with different situations here. For this reason, you can follow these steps via the Huawei UDP link. When the linking process is complete, you should see that it is successful as in the image below.

Connecting Huawei AppGallery with Unity Deployment Portal

After successfully completing the linking process, we go to Game Info and fill in all the fields in Game Description. These fields will then match the required fields in the store and automatically fill in the store information.

Filling in Game Information

Then we upload the APK/ABB file that we received 64-bit build on the Unity Editor to the Binary section as in the image below.

Uploading Game APK

After the installation process, we click the RELEASE button in the upper right corner and continue by saying RELEASE after filling in the fields that appear as in the image below.

Game Release

After this section, we go to the Publish section and then select Repack game on the right side. The purpose of this is to download the repackaged Apk first and test if it works correctly.

Release

Download the APK by clicking on the download button on the right side.

Release

After downloading the APK, you can test your game on your own device or if you prefer, you can select a Huawei phone and test your game in the Cloud Debugging section in AppGallery Connect as in the image below.

Test

After successfully completing your tests, we select Repack game and submit it to the store in Huawei AppGallery via Unity Distribution Portal (UDP) and then Publish.

Publish

After that, we can see the steps in the Status tab. There are 4 steps here. You may need to wait an average of 1 business day in the Store Review section. If you get an error there, the Huawei team will notify you of the problems you need to fix. By entering AppGallery Connect or by following the steps in the mail sent to your e-mail address, you can make the necessary modifications to your game, install your Apk and follow the same steps again.

Publish

If the live light is green, you can now access your app through AppGallery, congratulations. ¯\_( ͡° ͜ʖ ͡°)_/¯ 🎉

Huawei AppGallery Game View and Download
Congratulations

Towards the Conclusion

Well, folks, it’s a wrap! By following the steps outlined in this guide, you’ve taken a big step toward game developer stardom. Congratulations on publishing a game on Huawei AppGallery! You’re now part of the elite group of people who can boast about how they’ve been in the virtual world more times than in the real world. Here’s to many more games, and to the memories of staring at a screen for hours on end. Enjoy the journey!

--

--

Seyyid Yiğit
Huawei Developers

I’m a software engineer at Huawei. I love AI, fitness, gaming and sharing my projects and tips with you. Curious? Let’s learn together!